\\1', $str); $str = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '\\1\\2', $str); $str = eregi_replace('([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})', '\\1', $str); return $str; } function printRedirect($url, $sec) { ?> $totalRecords) $endentry = $totalRecords; while ($startentry <= $endentry) { $tmpEntries[] = $dbRows[$startentry-1]; $startentry++; } $info = array('entries' => $tmpEntries, 'numpages' => $numPages); return $info; } function printJumpToPage($url, $numPages, $pagenum) { if ($pagenum == "") $pagenum = 1; if ($numPages > 1) { echo "Gehe zu : "; echo "Erste Seite "; if ($pagenum > 1) { $x = $pagenum - 1; echo "« "; } if ($numPages > 5) { if ($pagenum < $numPages - 1) { // start at the page number before the current one if ($pagenum > 1) $start = $pagenum - 1; for ($x = $start; $x < $numPages; $x++) { if ($x != $numPages - 1) { if ($pagenum == $x) { $lastPrinted = $x; echo "$x "; } else if ($x == $pagenum - 1 || $x == $pagenum + 1) { $lastPrinted = $x; echo "$x "; } } } $dot = " ... "; for ($x = $numPages-1; $x < $numPages + 1; $x++) { if ($dot != '') { if ($lastPrinted != $numPages-2) $dot = " ... "; else $dot = ""; } echo "$dot$x "; $dot = ""; } } else { $end = 3; for ($x = 1; $x < $end; $x++) { if ($pagenum == $x) echo "$x "; else echo "$dot$x "; } echo " ... "; if ($pagenum > 1) $start = $pagenum - 1; for ($x = $start; $x < $numPages + 1; $x++) { if ($x != 2) { if ($pagenum == $x) { $lastPrinted = $x; echo "$x "; } else if ($x == $pagenum - 1 || $x == $pagenum + 1) { $lastPrinted = $x; echo "$x "; } } } } } else { for ($x = 1; $x < $numPages + 1; $x++) { if ($pagenum == $x) { echo "$x "; } else { echo "$x "; } } } if ($pagenum < $numPages) { $x = $pagenum + 1; echo "» "; } echo "Letzte Seite "; } } function isLoggedIn() { if ($_SESSION['password'] == "") { header("Location: answer.php"); } } function dateFormatAdv($timestamp, $format) { return date($format, $timestamp); } function fixStr($str) { $str = str_replace("¦", "¦", $str); $str = str_replace("<", "<", $str); $str = str_replace(">", ">", $str); $str = str_replace("\r\n", "(br)", $str); $str = stripslashes($str); return $str; } function fixBrk($str) { return str_replace("(br)", "\r\n", $str); } function fixBrkForHTML($str) { return str_replace("(br)", "
", $str); } function printTemplateAnswers() { $templates = file(ANSWERS); if (count($templates) > 0) { echo 'Use saved answer: '; } else { echo 'Template benutzen'; } } function getTotalAnswered() { $dbRows = file(DBFILE); foreach ($dbRows as $rows) { list($id, $question, $answer)= get($rows); if ($answer != 'null') { $answeredRows[] = $rows; } } return $answeredRows; } function addQuestion($q) { global $timeBetweenPost, $sec, $phpSelf, $qSuccess, $qFailed_DoublePost, $qFailed_BlankPost; $id = getFileId(DBFILE); $ip = $_SERVER['REMOTE_ADDR']; if (($q != '') && ($_SESSION['floodcontrol'] <= $timeBetweenPost)) { $datetime = time(); $q = fixStr($q); $break = ""; if (total(DBFILE) != 0) $break = "\r\n"; $fd = fopen(DBFILE, "a+") or die("Can not open file: ".DBFILE); $wdata = "$break$id\¦$q\¦null\¦$ip\¦$datetime\¦0"; $fout = fwrite($fd, $wdata); if ($fout != strlen($wdata)) { echo "File write failed"; return false; } fclose($fd); list($id, $key, $panelurl, $email, $notify, $entryPerPage, $dtFormat) = getFileRow(CONFIGFILE); if ($notify == 'yes' && $email != '@') sendMailNotification($email, $q, $panelurl); $_SESSION['floodcontrol'] = $timeBetweenPost + $sec; echo $qSuccess; } else { if ($_SESSION['floodcontrol'] > $timeBetweenPost) { echo $qFailed_DoublePost; } else if ($q == '') { echo $qFailed_BlankPost; } } printRedirect($phpSelf."?page=".$_GET['page'], 3); } function sendMailNotification($sendToEmail, $q, $domainUrl) { $subject = "New question submitted"; $message = "Question submitted:\r\n"; $message .= $q . "\r\n\r\n"; $message .= "Reply by logging into your control panel:\r\n"; $message .= $domainUrl; mail($sendToEmail, $subject, $message, "From: $sendToEmail<$sendToEmail>\r\n"); } function addAnswer($answerToAdd) { $break = ""; if (total(ANSWERS) != 0) $break = "\r\n"; $fd = fopen(ANSWERS, "a+") or die("Can not open file: ".ANSWERS); $wdata = "$break$answerToAdd"; $fout = fwrite($fd, $wdata); if ($fout != strlen($wdata)) { echo "File write failed"; return false; } fclose($fd); } function getTotalUnanswered() { $dbRows = file(DBFILE); foreach ($dbRows as $rows) { list($id, $question, $answer)= get($rows); if ($answer == 'null') $unansweredRows[] = $rows; } return $unansweredRows; } function logUser($pass) { $config = getFileRow(CONFIGFILE); list($id, $key, $domainUrl) = $config; if (!$pass){ return "Passwort vergessen?
\r\n"; } else { $pass = strtolower($pass); $pass = crypt($pass, $key); } if ($pass != $key) { return "Fasches Passwort!
\r\n"; } else { $_SESSION['password'] = $pass; header("Location: ".$phpSelf."?go=home"); } } function desc($rows) { $rowCount = count($rows); $cur = end($rows); if ($rowCount != 1) { for ($i = 0; $i < $rowCount; $i++) { $newRows[$i] = $cur; $cur = prev($rows); } return $newRows; } else return $rows; } $HEADER = <<
A S K M E - Adminbereich

A S K M E - Adminbereich

MENÜ
Unbeantwortet
Alte Fragen bearbeiten
Templates
Konfiguration
Ausloggen
HEADER; ///////////////////////////////////////////////////////////////////////// // NORMAL FOOTER // ------------- ///////////////////////////////////////////////////////////////////////// $FOOTER = <<
FOOTER; $TOP_LOGIN_FORM = << Login zum A S K M E - Adminbereich
Login
Passwort:
TOPLOGINFORM; ///////////////////////////////////////////////////////////////////////// // LOGGIN PAGE - BOTTOM/FOOTER // ------------------ ///////////////////////////////////////////////////////////////////////// $BOTTOM_LOGIN_FORM = <<
Powered by WakScripts
By Sweet-Kitty
BOTTOMLOGINFORM; $phpSelf = $_SERVER['PHP_SELF']; function get($data) { return explode("\¦", $data); } function addRow($db_loc, $rowToAdd) { $id = getFileId(DBFILE); $break = ""; if (total($db_loc) != 0) $break = "\r\n"; $fd = fopen($db_loc, "a+") or die("Can not open file: ".$db_loc); $wdata = "$break$id\¦$rowToAdd"; $fout = fwrite($fd, $wdata); if ($fout != strlen($wdata)) { echo "File write failed"; return false; } fclose($fd); } function getFileRow($file) { $fd = fopen($file, "r") or die("Can not open file: $file"); $rstr = fread($fd, filesize($file)); fclose($fd); return explode("\¦", $rstr); } function total($db_loc) { $db = file($db_loc); if (is_array($db)) return count($db); else return 1; } function getFileId($db_loc) { $db = file($db_loc); $db = get($db[count($db)-1]); return $db[0]+1; } function getFileRowById($db_loc, $match_id) { $db = file($db_loc); foreach ($db as $t) { $d = get($t); $id = $d[0]; if ($id == $match_id) return $d; } return false; } function replaceRow($db_loc, $matchid, $wdata) { $data = ""; $break = "\r\n"; $wdata = trim($wdata); $dbRows = file($db_loc); foreach ($dbRows as $rows) { list($id)= get($rows); if ($id != $matchid) $data .= $break.trim($rows); else $data .= "$break$wdata"; } $data = trim($data); $fd = fopen($db_loc, "w+") or die("Can not open file: ".$db_loc); $fout = fwrite($fd, $data); fclose($fd); } function delete($db_loc, $id) { $db = file($db_loc); $dbentries = ""; if (count($db) == 1) { $d = getFileRow($db_loc); if ($d[0] != $id) { $dbentries .= $db[0]; } } else { foreach ($db as $t) { $d = get($t); if ($d[0] != $id) { $dbentries .= $t; } } } $dbentries = trim($dbentries); $fd = fopen($db_loc, "w+") or die("Can not open file: ".$db_loc); $fout = fwrite($fd, $dbentries); fclose($fd); } function dateFormatShort($timestamp) { return date('d-m-y', $timestamp); } function dateFormatFull($timestamp) { return date('d-m-Y', $timestamp) . " " . timeFormat($timestamp); } function dateFormat($timestamp) { return date('d-m-Y', $timestamp); } function timeFormat($timestamp) { if (date("H", $timestamp) > 12) { $hrampm = date("H", $timestamp) - 12; $hrampm = date("$hrampm:i:s", $timestamp) . "pm"; } else { $hrampm = date("H", $timestamp); $hrampm = date("$hrampm:i:s", $timestamp). "am"; } return $hrampm; } ?>
LÖSCHEN

HALLO BITTE LÖSCHT MICH AFFIS ! ICH WILL HIER NUR NE KLEINE PAGE HABEN

MIT STUFF UND SO <3

12.4.08 09:02


UPDATE

HALLO :D ICH HAB MAL WAS GETAN !

NEUER BUTTON FÜR DEI SEITE UND ZWEI ANDERE !
UND EIN TOLLES NEUES PROIL !

10.4.08 19:37


SRY SRY SRY SRY !

Sorry das ich mich lange nicht gemeldet habe =[ tut mir leid. Demnächst werde ich viel mehr tun !
7.4.08 19:35


NEW . NEW . NEW

hallo & -lich Willkommen auf meiner neuen Page. Früher war ich sozusagen auch bei http://www.myblog.de/mottos.style/ da bin ich jetzt aber nicht mehr dabei... Weshalb ? ! SAG ICH EUCH NICHT XD Affis gesucht xD
28.3.08 11:06


Gratis bloggen bei
myblog.de