<h6 class="title">Error</h6> <h6 class="date"><?php echo datum(); ?> </h6> <h6 class="text"> Deze pagina kan niet gevonden worden. </h6>
} elseif ($action == 'read') { $data['nav_path'] .= ' >> &Privatnachricht lesen'; $r_pm = db_query("SELECT\n\t pm_id,\n\t\t pm_autor,\n\t\t pm_text,\n\t\t pm_empf,\n\t\t pm_time,\n\t\t pm_topic,\n\t\t pm_gelesen,\n\t\t pm_antwort,\n\t\t pm_saved\n\t FROM " . $pref . "pm WHERE pm_id='{$pmid}'"); if (db_rows($r_pm) != 1) { message('Sorry! Es gibt keine PM mit dieser ID.', 'Fehler', 0); } $pm = db_result($r_pm); if ($pm['pm_autor'] != U_NAME && $pm['pm_empf'] != U_NAME) { message('Du bist nicht berechtigt diese Nachricht zu lesen.', 'Rechte', 0); } db_query("UPDATE " . $pref . "pm SET\n\t pm_gelesen='1'\n\t WHERE pm_id='{$pmid}'"); $TPm = Get_Template('templates/' . $style['styletemplate'] . '/pm_read.html'); $TPm = str_replace('[pmid]', $pm['pm_id'], $TPm); $TPm = str_replace('[autor]', '<a href="s_profile.php?username='******'pm_autor'] . '">' . $pm['pm_autor'] . '</a>', $TPm); $TPm = str_replace('[empf]', '<a href="s_profile.php?username='******'pm_empf'] . '">' . $pm['pm_empf'] . '</a>', $TPm); $TPm = str_replace('[datum]', datum($pm['pm_time']), $TPm); $TPm = str_replace('[topic]', $pm['pm_topic'], $TPm); $TPm = str_replace('[text]', parse_code($pm['pm_text'], 1, 1, 1, $config['smilies']), $TPm); // user update $r_pm = db_query("SELECT\n\t COUNT(pm_id)\n\t FROM " . $pref . "pm WHERE pm_empf='" . U_NAME . "' AND pm_gelesen='0'"); $pm = db_result($r_pm); list(, $new) = each($pm); db_query("UPDATE " . $pref . "user SET\n\t\t pm_new='" . ($new == 0 ? 0 : 1) . "'\n\t WHERE user_id='" . U_ID . "'"); } elseif ($action == 'delete') { if (isset($all)) { $r_pm = db_query("SELECT\n\t pm_id\n\t FROM " . $pref . "pm WHERE pm_autor='" . U_NAME . "' OR pm_empf='" . U_NAME . "'"); $pmdel = array(); if (db_rows($r_pm) > 0) { while ($pm = db_result($r_pm)) { $pmdel[] = $pm['pm_id']; }
if ($board['last_post_id'] > $_SESSION[$session_var] && $board['last_post_id'] != 0) { $gif = '_new'; $new_topic = 1; $new_cat = 1; } } $boardname = '<a href="board.php?boardid=' . $board['board_id'] . '"><b>' . $board['board_name'] . '</b></a>'; $boardname .= '<br />[smallfont]' . $board['board_under'] . '[smallfontend]'; $threads = $board['threads']; $posts = $board['posts']; if (P_SHOWDELETED == 1) { $threads .= '/<font color="' . $style['col_link'] . '">[smallfont]' . $board['threads_del'] . '[smallfontend]</font>'; $posts .= '/<font color="' . $style['col_link'] . '">[smallfont]' . $board['posts_del'] . '[smallfontend]</font>'; } if ($board['last_act_time'] != 0) { $last = datum($board['last_act_time']); if (strlen($board['last_act_thread']) > 50) { $board['last_act_thread'] = substr($board['last_act_thread'], 0, 46) . '...'; } $last .= '<br /><a href="showtopic.php?threadid=' . $board['last_thread_id'] . '&boardid=' . $board['board_id'] . '&page=last">' . $board['last_act_thread'] . '</a>'; $last .= ' von <a href="s_profile.php?username='******'last_act_user'] . '">' . $board['last_act_user'] . '</a>'; } else { $last = '<center>unbekannt</center>'; } $row = $TBoardrow; $row = str_replace('[board_gif]', '<img src="templates/' . $style['styletemplate'] . '/images/board' . $gif . '.gif" border="0">', $row); $row = str_replace('[forum_name]', $boardname, $row); $row = str_replace('[threads]', $threads, $row); $row = str_replace('[posts]', $posts, $row); $row = str_replace('[last]', $last, $row); $category .= $row;
<?php // enkele variabelen voor navigatie $page = !isset($_GET['nav']) ? 1 : $_GET['nav']; // max $max = 8; //aantal records per pagina $start = $max * $page - $max; $query = mysql_query('SELECT *, DATE_FORMAT(`datum`, "%d/%M/%m/%Y %H:%i") AS `formatdatum` FROM nieuws ORDER BY id DESC LIMIT ' . $start . ', ' . $max); if (mysql_num_rows($query) < 1) { echo '<h6 class="title">Startpagina</h6>'; echo '<h6 class="date">' . datum() . '</h6>'; echo '<h6 class="text">Er zijn nog geen artikels in de database.</h6>'; } else { while ($row = mysql_fetch_array($query)) { ?> <h6 class="title" style="margin-top: 0;"><?php echo artikelInOrde($row['titel']); ?> </h6> <h6 class="date"><?php echo datumOmzetten($row['formatdatum']); ?> </h6> <h6 class="text"><?php echo artikelInOrde($row['artikel']); ?> </h6> <div style="padding: 0; margin: 0 0 25px 0; border-bottom: 1px dashed #CECECE;"></div> <?php }
?> €</td> <td class="shortcut"><?php echo $row["shortcut"]; ?> </td> <td class="plmi"><?php echo printSign(StrToPlMi($row["change"]), " €"); ?> </td> <td class="mlmiproz"><?php echo printSign(StrToPercent($row["change"]), " %"); ?> </td> <td class="datum"><?php echo datum($row["date"]); ?> </td> </tr> <tr> <td colspan="6"> <div style="width:device-width"> <!-- Bild --> <div style="float:left; width: 40%; text-align: center;"> <a href="http://chart.finance.yahoo.com/z?s=<?php echo $row["shortcut"]; ?> &t=6m&q=l&l=on&z=l" target="_blank"> <img class="image" src="" loadURL="http://chart.finance.yahoo.com/z?s=<?php echo $row["shortcut"];
$i = 0; while ($user = db_result($r_user)) { if (U_ID < 1) { $mail = '- Versteckt'; } else { if ($user['user_mail'] == '') { $mail = ' '; } if ($user['user_nomail'] == 1 && U_ISADMIN == 0 && U_ISMOD == 0) { $mail = '- Versteckt'; } if ($user['user_nomail'] == 0 || $user['user_nomail'] == 1 && (U_ISADMIN == 1 || U_ISMOD == 1)) { $mail = '<a href="mailto:' . $user['user_mail'] . '">' . $user['user_mail'] . '</a>'; } } $row = $TRow; $row = str_replace('[color_row]', $i % 2 == 0 ? '[CellB]' : '[CellA]', $row); $row = str_replace('[name]', '<a href="s_profile.php?username='******'user_name'] . '">' . $user['user_name'] . '</a>', $row); $row = str_replace('[mail]', $mail, $row); $row = str_replace('[icq]', $user['user_icq'] != 0 ? $user['user_icq'] : ' ', $row); $row = str_replace('[hp]', $user['user_hp'] != '' && $user['user_hp'] != 'http://' ? '<a href="' . $user['user_hp'] . '" target="_blank">' . $user['user_hp'] . '</a>' : ' ', $row); $row = str_replace('[ort]', $user['user_ort'] != '' ? $user['user_ort'] : ' ', $row); $row = str_replace('[posts]', $user['post_count'], $row); $row = str_replace('[join]', datum($user['user_join']), $row); $row = str_replace('[last]', $user['user_lastpostt'] != 0 ? datum($user['user_lastpostt']) : 'N/A', $row); $memberslist .= $row; $i++; } $TList = str_replace('[members]', $memberslist, $TList); $data['boardtable'] = Template($TList); echo Output(Template($TBoard));
} else { $row = str_replace('[value]', '<a href="mailto:' . $profile['user_mail'] . '">' . $profile['user_mail'] . '</a>', $row); } $table .= $row; $i++; // Registrierung $row = str_replace('[bgcolor]', color($i), $line); $row = str_replace('[name]', 'Registrierdatum', $row); $row = str_replace('[value]', datum($profile['user_join']), $row); $table .= $row; $i++; // last Post time if ($profile['user_lastpostt'] != 0) { $row = str_replace('[bgcolor]', color($i), $line); $row = str_replace('[name]', 'Letzter Beitrag [smallfont](Zeit)[smallfontend]', $row); $row = str_replace('[value]', datum($profile['user_lastpostt']), $row); $table .= $row; $i++; } // last Post if ($profile['user_lastpostid'] != 0) { $row = str_replace('[bgcolor]', color($i), $line); $row = str_replace('[name]', 'Letzter Beitrag', $row); $row = str_replace('[value]', '<a href="findpost.php?postid=' . $profile['user_lastpostid'] . '">' . $profile['user_lasttopic'] . '</a>', $row); $table .= $row; $i++; } // optionen $row = str_replace('[bgcolor]', color($i), $line); $row = str_replace('[name]', 'Optionen', $row); $value = '';
' . ($a_thread['deleted'] == 1 && P_SHOWDELETED ? ' <img src="templates/' . $style['styletemplate'] . '/images/saved_no.gif" width="10" height="10" border="0" />' : '') . '</td> <td class="blank" style="text-align:right">[smallfont]' . $a_thread['thread_views'] . '[smallfontend]</td> </tr>'; $i++; } mysql_free_result($r_thread); unset($a_thread); // Letzte 10 Posts $r_post = db_query("SELECT\n thread_topic, thread_id, last_post_id, last_act_time, board_id\n FROM " . $pref . "thread WHERE board_id IN (" . $show_boards . ") " . (P_SHOWDELETED ? "" : "AND deleted='0'") . " ORDER BY last_act_time DESC LIMIT 0, 10"); $i = 1; $data['last10posts'] = ''; while ($a_post = db_result($r_post)) { $data['last10posts'] .= '<tr bgcolor="' . ($i % 2 == 0 ? '[CellA]' : '[CellB]') . '"><td class="blank" width="10" style="text-align:right"> [smallfont]' . $i . '[smallfontend] </td><td class="blank"> [smallfont]<a href="showtopic.php?threadid=' . $a_post['thread_id'] . '&boardid=' . $a_post['board_id'] . '#p' . $a_post['last_post_id'] . '">' . len($a_post['thread_topic']) . '</a>[smallfontend]</td> <td class="blank" style="text-align:right">[smallfont]' . datum($a_post['last_act_time']) . '[smallfontend]</td> </tr>'; $i++; } mysql_free_result($r_post); unset($a_post); // letze 12 Monate $month = date("m", $board_time); $year = date("Y", $board_time); $monatsname = array(" ", "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"); $monate = array(); $monate[] = array($monatsname[intval($month)] . ' ' . $year, mktime(0, 0, 0, intval($month), 1, $year), mktime(0, 0, -1, intval($month) + 1, 1, $year)); for ($i = 0; $i < 12; $i++) { $month--; if ($month == 0) { $month = 12;
function saveDocVorlage($data, $files) { if (!$data["did"]) { $data["did"] = mknewDocVorlage(); if (!$data["did"]) { return false; } } if ($files["file"]["name"]) { exec("cp " . $files["file"]["tmp_name"] . " ./vorlage/" . $files["file"]["name"]); $file = $files["file"]["name"]; } else { $file = $data["file_"]; } if (!$data["vorlage"]) { $data["vorlage"] = "Kein Titel " . datum("d.m.Y"); } $sql = "update docvorlage set vorlage='" . $data["vorlage"] . "', beschreibung='" . $data["beschreibung"]; $sql .= "', file='" . $file . "', applikation='" . $data["applikation"] . "' where docid=" . $data["did"]; $rs = $_SESSION['db']->query($sql); if (!$rs) { return false; } else { return $data["did"]; } }
$aantal_dagen_in_maand = date('t', $tijdstip_in_maand); // We kiezen een willekeurige dag in de maand $dag = rand(1, $aantal_dagen_in_maand); // We schrijven het resultaat naar het scherm print "{$dag} {$benaming_maand} {$jaar}<br>"; } // We zoeken eerst in 11 opeenvolgende jaren een willekeurige datum // Omdat er geen beperking is voor de maanden moet er maar één argument worden doorgegeven for ($i = 2010; $i <= 2020; $i++) { datum($i); } print "<br>"; // We zoeken vervolgens in 11 opeenvolgende jaren een willekeurige datum in juli of augustus // We geven nu wel een array door met de nummers van de maanden juli en augustus for ($i = 2010; $i <= 2020; $i++) { datum($i, array(7, 8)); } ?> <h1>nieuwjaar</h1> <?php $jaar = date('Y'); $volgendjaar = $jaar + 1; $nu = time(); $nieuwjaar = mktime(0, 0, 0, 1, 1, $volgendjaar); $verschil = ($nieuwjaar - $nu) / 60 / 60 / 24; $verschil = ceil($verschil); echo "Nog {$verschil} aantal dagen tot nieuwjaar."; ?>
if ($ownpost == 1 && P_EDIT || $ownpost == 0 && P_OEDIT) { $more .= ($more == '' ? '' : '|| ') . '<a href="edit.php?action=edit&threadid=' . $threadid . '&postid=' . $post['post_id'] . '&boardid=' . $boardid . '&page=' . $page . '">' . ($style['editimage'] != '' ? '<img src="' . $style['editimage'] . '" border="0" />' : 'Editieren') . '</a> '; } if ($ownpost == 1 && P_DELPOST || $ownpost == 0 && P_ODELPOST) { $more .= ($more == '' ? '' : '|| ') . '<a href="edit.php?action=delete&threadid=' . $threadid . '&postid=' . $post['post_id'] . '&boardid=' . $boardid . '&page=' . $page . '">' . ($style['deleteimage'] != '' ? '<img src="' . $style['deleteimage'] . '" border="0" />' : 'Löschen') . '</a> '; } } // noch mal optionen if (U_ID != 0 && $config['report'] == 1) { $options .= ($options == '' ? '' : ' || ') . '<a href="report.php?boardid=' . $boardid . '&threadid=' . $threadid . '&postid=' . $post['post_id'] . '&page=' . $page . '">' . ($style['reportimage'] != '' ? '<img src="' . $style['reportimage'] . '" border="0" />' : 'Melden') . '</a> '; } // TEMPLATE $row = $TPostrow; $row = str_replace('[anker]', $anker, $row); $row = str_replace('[post_num]', $post_num_string, $row); $row = str_replace('[post_time]', datum($post['post_time']), $row); $row = str_replace('[user_name]', $user_name, $row); $row = str_replace('[user_title]', $user_title, $row); $row = str_replace('[avatar]', $avatar, $row); $row = str_replace('[stat]', $statik, $row); $row = str_replace('[join_time]', $join, $row); $row = str_replace('[threadautor]', $threadautor, $row); $row = str_replace('[ip]', $ip, $row); $row = str_replace('[post]', parse_code($post['post_text'], 1, 1, $post['bcode'], $smilies), $row); $row = str_replace('[signatur]', $signatur, $row); $row = str_replace('[editline]', $editline, $row); $row = str_replace('[new]', '<img src="' . $icon . '" border="0" align="left" />', $row); $row = str_replace('[options]', $options, $row); $row = str_replace('[more_options]', $more, $row); $posts .= $row; }
$onuser24 = array(); $onlinelist24 = ''; $r_24user = db_query("SELECT\n user_name,\n\t user_ishidden\n FROM " . $pref . "user WHERE user_lastacttime>'" . ($board_time - 86400) . "'"); if (db_rows($r_24user) > 0) { while ($a_24user = db_result($r_24user)) { if ($a_24user['user_ishidden'] == 0) { $onlinecount24++; $onuser24[] = '<a href="s_profile.php?username='******'user_name'] . '">' . $a_24user['user_name'] . '</a>'; } else { if (P_CANSEEINVIS == 1) { $onlinecount24++; $onuser24[] = '<a href="s_profile.php?username='******'user_name'] . '">' . $a_24user['user_name'] . '</a>(Versteckt)'; } } } } if (count($onuser24) > 0) { $onlinelist24 = implode(' ,', $onuser24); } unset($onuser24); mysql_free_result($r_24user); $r_onstat = db_query("SELECT\n max_online,\n\t max_online_time\n FROM " . $pref . "stats"); $a_onstat = db_result($r_onstat); $rek = $a_onstat['max_online']; $rekorttime = datum($a_onstat['max_online_time']); if ($onlinecount > $rek) { $rek = $onlinecount; $rekorttime = datum($board_time); db_query("UPDATE " . $pref . "stats SET\n\t max_online='{$rek}',\n\t\t max_online_time='{$board_time}'"); } mysql_free_result($r_onstat);