<?php require_once "inc/initialize.php"; $md5mail = md5('email'); if (!isset($_GET[$md5mail])) { pageredirect('index.php'); } else { $encryptedmail = $_GET[$md5mail]; $decryptedmail = customDecrypt($encryptedmail); } ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>University of Jos, Nigeria</title> <?php require_once LIB_PATH . DS . 'css.php'; ?> </head> <body> <?php include_layout_template("header.php"); ?> <!--The Main Content Here Please--> <div class="container"> <div class="span8 offset2 border-radius"> <h5 align="center">Reset Password</h5> <hr> <form class="contact-us resetpassword" action="#" >
function ticker() { global $db; echo '<html> <head> <title>Diary :: Ticker Admin</title> <link rel="stylesheet" type="text/css" href="style.css" /> <script language="JavaScript" src="../../../scripts/header.js"></script> </head> <body> '; //$db = new PHP_DB_diary; $act2 = @$_REQUEST['act2']; if (isset($_GET['act2']) && $_GET['act2'] == 'n') { global $d_date6, $PHP_SELF; //$db = new DB_diary; // add new ticker item $ticker_text = addslashes(@$_POST['txt_ticker_text']); $ticker_url = addslashes(dealwithURL(@$_POST['txt_ticker_url'])); $db->query("insert into diary_ticker (d, link_text, link_url) values ('{$d_date6}', '{$ticker_text}', '{$ticker_url}')"); pageredirect('tools2.php?act=ticker'); } else { if (isset($_GET['act2']) && $_GET['act2'] == 'e') { // complete edit //$db = new DB_diary; if (isset($_POST['txt_linktext'])) { $ticker_url = addslashes(dealwithURL2(@$_POST['txt_link_url'])); echo $ticker_url; $db->query("update diary_ticker set link_text='" . addslashes($_POST['txt_linktext']) . "', link_url='" . $ticker_url . "' where id=" . $_POST['tick_id']); pageredirect('tools2.php?act=ticker'); } else { // show edit form $r = $link->query("select * from diary_ticker where id=" . $_GET['id']); $rw = $r->fetch(); echo ' <form name="frmUpdate" method="post" action="tools2.php?act=ticker&act2=e"> <table class="t1"> <tr valign="top"> <td>Link Text</td> <td><input class="ThinBorder" type="text" name="txt_linktext" value="' . stripslashes($rw['link_text']) . '" size="90" /></td> </tr> <tr valign="top"> <td>Link URL</td> <td><input class="ThinBorder" type="text" name="txt_link_url" value="' . stripslashes($rw['link_url']) . '" size="90" /></td> </tr> <tr valign="top"> <td> </td> <td><input type="hidden" name="tick_id" value="' . $rw['id'] . '" /><input type="submit" value="Submit" /> <input type="button" value="Cancel" onclick="history.go(-1)" /></td> </tr> </table> </form>'; } } else { if (isset($_GET['act2']) && $_GET['act2'] == 'd') { // delete single ticker item //$db = new DB_diary; $r = $link->query("delete from diary_ticker where id=" . $_GET['id']); pageredirect('tools2.php?act=ticker'); } else { if (isset($_GET['act2']) && $_GET['act2'] == 'd2') { // delete multiple ticker items while (list($prod, $pid) = each($_POST['item_id'])) { // echo $prod; $r = $link->query('delete from diary_ticker where id = ' . $pid); //echo 'delete from diary_ticker where id = ' . $pid . '<br />'; //if (!$r_budget) echo mysql_error(); break; } } else { // Show main ticker form //$db = new DB_diary; $r = $link->query("select * from diary_ticker order by d desc"); echo ' <script> function tes() { var d = document.frmArticle; // SCRIPT FOR CHECKING IF ROWS ARE SELECTED FOR DELETION/TRANSFER/MOVE DOWN it_ch = 0; for (i=0; i < d.elements.length; i++) if (d.elements[i].name == \'item_id[]\' && d.elements[i].checked) var it_ch = 1; if (it_ch) { // if (confirm(det + \': Are You Sure?\')) { // d.submit(); // return true; // } else return false; } else { //alert(\'You have not selected any rows\'); //return false; } } </script> <form name="frmTicker" method="post" action="tools2.php?act=ticker&act2=n" onsubmit="return tes();"> <table class="t1" border="1">'; if ($r->rowCount() > 0) { $tck_cnt = 0; while ($rw = $r->fetch()) { echo ' <tr> <td>' . formatmydate($rw['d'], 0, 1) . '</td> <td><a href="' . $rw['link_url'] . '">' . stripslashes($rw['link_text']) . '</a> </td> <td width="1"><input title="Edit this item" type="button" value="E" onclick="window.location=\'' . TOOLS_SCRIPT . '?act=ticker&act2=e&id=' . $db->Record['id'] . '\'" /></td> <td width="1"><input title="Delete this item" type="button" value="D" onclick="confirmDelete(\'' . TOOLS_SCRIPT . '?act=ticker&act2=d&id=' . $db->Record['id'] . '\', \'Remove ticker item?\'); return false;" /></td> <td width="1"><input type="checkbox" name="item_id[]" value="' . $rw['id'] . '" /></td> </tr>'; $tck_cnt++; } echo ' <tr valign="top"> <td colspan="5" align="right">Select <a class="d_link" href="#" onclick="chk_sd1(document.frmTicker, true); return false">All</a> | <a class="d_link" href="#" onclick="chk_sd1(document.frmTicker, false); return false">None</a> | <a class="d_link" href="#" onclick="chk_sd(document.frmTicker); return false">Invert</a></td> </tr> <tr valign="top"> <td colspan="5" align="right"><input name="del2" type="submit" value="Delete Selected" onclick="return confirm (\'Delete the selected Items?\')" /> | <input type="button" value="<< Diary" onclick="window.location=\'index3.php\'" /></td></tr>'; } echo ' <tr valign="top"> <td colspan="5"><input title="Link Text" type="text" name="txt_ticker_text" size="35" /> <input title="Link URL" type="text" name="txt_ticker_url" size="35" value="" /> <input name="add2" type="submit" value="Add New Item" /></td> </tr> </table> </form> <fieldset id="Preview"><legend>Preview:</legend> <div class="ticki"><a id="tickerAnchor" style="font-size: 18pt;" href="#" target="_top" class="tickl"></a></div></fieldset>'; echo '</td> </tr> </form> </body> </html>'; require "tck.inc.php"; } } } } $str = ''; return $str; }