require '../../includes/header.php'; ?> <?php require '../../includes/sidebar.php'; ?> <div class="content"> <?php // Displaying messages and errors include '../../includes/info.php'; ?> <h1>Count Sheets</h1> <div class="hr-line"></div> <form action="action.php" method="post" onSubmit=""> <div class="actions"> <?php echo edit_button('<button class="edit tooltip" accesskey="E" title="Edit [Alt+Shift+E]" name="action[]" value="EDIT-COUNT-SHEET">Edit</button>', 6); ?> <!-- <button class="block tooltip" accesskey="B" title="Block [Alt+Shift+B]" name="action[]" value="BLOCK" onClick="return confirm('Are you sure you want to block user(s)?')">Block</button> <button class="activate tooltip" accesskey="I" title="Activate [Alt+Shift+I]" name="action[]" value="ACTIVATE" onClick="return confirm('Are you sure you want to activate user(s)')">Activate</button>--> </div> <table cellpadding="0" cellspacing="0" border="0" id="dataTable"> <thead> <tr> <?php echo edit_checkbox('<th width="23"><input type="checkbox" id="select-all" accesskey="A" title="Select all [Alt+Shift+A]" class="tooltip"></th>', 6); ?> <th>Sheet No.</th> <th>Started date</th> <th>Completed date</th> <th>Status</th> <th>Counted by</th>
$tpl->define_dynamic('page_message', 'page'); $tpl->define_dynamic('hosting_plans', 'page'); $tpl->define_dynamic('button_list', 'page'); $tpl->define_dynamic('button_list', 'page'); $tpl->define_dynamic('add_button', 'page'); $tpl->define_dynamic('edit_button', 'page'); global $cfg; $theme_color = $cfg['USER_INITIAL_THEME']; $tpl->assign(array('TR_ADMIN_CUSTOM_MENUS_PAGE_TITLE' => tr('VHCS - Admin - Manage custom menus'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'])); gen_admin_menu($tpl); add_new_button($tpl, $sql); if (isset($_GET['delete_id'])) { delete_button($tpl, $sql); } if (isset($_GET['edit_id'])) { edit_button($tpl, $sql); } update_button($tpl, $sql); gen_button_list($tpl, $sql); $tpl->assign(array('TR_TITLE_CUSTOM_MENUS' => tr('Manage custom menus'), 'TR_ADD_NEW_BUTTON' => tr('Add new button'), 'TR_BUTTON_NAME' => tr('Button name'), 'TR_BUTTON_LINK' => tr('Button link'), 'TR_BUTTON_TARGET' => tr('Button target'), 'TR_VIEW_FROM' => tr('Show in'), 'RESELLER' => tr('Reseller level'), 'USER' => tr('Enduser level'), 'RESSELER_AND_USER' => tr('Reseller and enduser level'), 'TR_ADD' => tr('Add'), 'TR_MENU_NAME' => tr('Menu button'), 'TR_ACTON' => tr('Action'), 'TR_EDIT' => tr('Edit'), 'TR_DELETE' => tr('Delete'), 'TR_LEVEL' => tr('Level'), 'TR_SAVE' => tr('Save'), 'TR_EDIT_BUTTON' => tr('Edit button'))); gen_page_message($tpl); if (isset($_GET['edit_id'])) { $tpl->assign('ADD_BUTTON', ''); } else { $tpl->assign('EDIT_BUTTON', ''); } $tpl->parse('PAGE', 'page'); $tpl->prnt(); if (isset($cfg['DUMP_GUI_DEBUG'])) { dump_gui_debug(); }
function getStudents() { $fp = fopen("users.txt","r"); rewind($fp); $searched = $_POST['searched']; $edit = $_POST['edit']; $submit = $_POST['submit']; if(isset($submit)) { $isMatch = false; $cfp = fopen("usercopy.txt","w"); while(!feof($fp)) { $line = fgets($fp); $element = split("\|", $line); if(strcasecmp(($element[2] . " " . $element[3]), $_SESSION['search_student']) == 0) { $isMatch = true; //Assign variables to capture (trimmed) input from the form. $uname = str_replace(" ","",$_POST['uname']); $pword = str_replace(" ","",$_POST['pword']); $fname = str_replace(" ","",$_POST['fname']); $lname = str_replace(" ","",$_POST['lname']); $snumber = str_replace(" ","",$_POST['snumber']); $email = str_replace(" ","",$_POST['email']); $program = str_replace(" ","",$_POST['program']); $program_end = str_replace(" ","",$_POST['program_end']); $birth = str_replace(" ","",$_POST['birth']); $telephone = str_replace(" ","",$_POST['telephone']); $address = str_replace(" ","",$_POST['address']); $suburb = str_replace(" ","",$_POST['suburb']); $state = str_replace(" ","",$_POST['state']); $pcode = str_replace(" ","",$_POST['pcode']); $status = str_replace(" ","",$_POST['status']); $write_values = array("$uname","$pword","$fname","$lname","$snumber","$email","$program", "$program_end","$birth","$telephone","$address","$suburb","$state","$pcode","Student","$status"); echoLine($write_values); echo "<tr><td></td><td><p>Back to <a href='students.php'>Student Management</a>.</p></td>"; $write_values = implode("|",$write_values); fwrite($cfp, $write_values); fwrite($cfp,"\n"); } else { $isMatch = false; fwrite($cfp,$line); } } fclose($fp); fclose($cfp); $userFile = "users.txt"; $copyFile = "usercopy.txt"; $fp = fopen($userFile, "w+"); $cfp = fopen($copyFile, "r"); $file_contents = fread($cfp, filesize($copyFile)); fwrite($fp, $file_contents); fclose($cfp); rewind($fp); fclose($fp); } else if(isset($edit)) { $isMatch = false; while(!feof($fp) and $isMatch == false) { $line = fgets($fp); $element = split("\|", $line); //This compares the first and second name of a student with the search field. if(strcasecmp(($element[2] . " " . $element[3]), $_SESSION['search_student']) == 0) { $isMatch = true; editForm($element); } else { $isMatch = false; } } } else if(isset($searched)) { $_SESSION['search_student'] = $_POST['search_student']; $isMatch = false; while(!feof($fp) and $isMatch == false) { $line = fgets($fp); $element = split("\|", $line); if(strcasecmp(($element[2] . " " . $element[3]), $_SESSION['search_student']) == 0) { $isMatch = true; echoLine($element); edit_button(); } else { $isMatch = false; } } } else { while (!feof($fp)) { $line = fgets($fp); $element = split("\|", $line); if(strcmp(trim($element[14]), "Student") == 0) { echoLine($element); } } } }
$ip = $_SERVER['REMOTE_ADDR']; if ($countryinfo = $DB->get_record_sql("SELECT * FROM {countries} WHERE ipfrom <= inet_aton('{$ip}') AND inet_aton('{$ip}') <= ipto ")) { $usercountry = $countryinfo->code2; } } if (empty($country) and $usercountry) { $country = $usercountry; } $hide_all_links = false; $mostrecent = 0; $strresources = get_string("modulenameplural", "resource"); $PAGE->set_context(context_system::instance()); $PAGE->set_url(new moodle_url('/sites/index_norecordset.php')); $PAGE->set_title('Moodle: Moodle sites'); $PAGE->set_heading('Moodle sites'); $PAGE->set_button(edit_button($isadmin, $country)); $PAGE->navbar->add($strresources . ' ' . $PAGE->heading, new moodle_url('/mod/resource/index.php', array('id' => SITEID))); echo $OUTPUT->header(); /// Process cool / uncool if ($cool or $uncool) { if (isloggedin() and confirm_sesskey()) { if ($site = $DB->get_record('hub_site_directory', array('id' => $cool + $uncool))) { // site exists $country = $site->country; if ($DB->record_exists('registry_votes', array('userid' => $USER->id, 'siteid' => $site->id))) { echo $OUTPUT->notification(get_string('erroralreadyvoted', 'local_hub', s($site->sitename))); } else { if ($cool) { $site->cool = $site->cool + 1; } else { if ($uncool) {
?> </div> <div class="hr-line"></div> <form action="action.php" method="post" id="action"> <div class="actions"> <?php echo edit_button('<button class="delete-record tooltip" title="Delete selected backup(s)" style="width: auto; height: auto; background-position: 5px 6px" form="action" onClick="return confirm(\'Are you sure you want to delete backup(s)?\');" name="action[]" value="DELETE">Delete</button>', 3); ?> </div> <table cellpadding="0" cellspacing="0" border="0" id="dataTable"> <thead> <tr> <?php echo edit_button('<th width="23"><input type="checkbox" id="select-all" accesskey="A" title="Select all [Alt+Shift+A]" class="tooltip"></th>', 3); ?> <th>Backup date</th> <th>File name</th> <th>Size</th> <th>Action</th> </tr> </thead> <tbody id="backup-files"> </tbody> </table> </form> <!-- end .content --></div> <!-- end .container --></div> </body>
} if (!empty($system->config['perpage'])) { $pages = ceil(sizeof($images) / $system->config['perpage']); if (!empty($_GET['page']) && (int) $_GET['page'] > 0) { $page = (int) $_GET['page'] - 1; } else { $page = 0; } $start = $page * $system->config['perpage']; $total = $system->config['perpage']; } else { $pages = 1; $page = 0; $start = 0; $total = sizeof($images); } $keys = @array_keys($images); $data['pagination'] = rcms_pagination(sizeof($images), $system->config['perpage'], $page + 1, '?' . $_SERVER['QUERY_STRING']); $c = $start; $data['images'] = array(); while ($total > 0 && $c < sizeof($keys)) { $image =& $images[$keys[$c]]; if ($image_data = $gallery->getData($image)) { $data['images'][$image] = $image_data + array('thumbnail' => $gallery->getThumbnail($image), 'comments' => $gallery->countComments($image)); } $total--; $c++; } $data['linkdata'] = $linkdata; show_window('<a href="?module=gallery">' . __('Gallery') . '</a>' . (cfr('GALLERY') ? ' ' . edit_button(ADMIN_FILE . '?show=module&id=gallery.upload&tab=5') : '') . (get('keyword') ? ' → ' . get('keyword') : ''), !empty($images) ? rcms_parse_module_template('gallery.tpl', $data) : __('Nothing founded'), 'center'); }
<body> <div class="container"> <div id="pop-up"></div> <div class="content" style="margin: 0; width: 99%;"> <?php // Displaying messages and errors include '../../includes/info.php'; ?> <h1>All Users of the System</h1> <div class="hr-line"></div> <form action="action.php" method="post" onSubmit=""> <div class="actions"> <?php echo edit_button('<button class="edit tooltip" accesskey="E" title="Edit [Alt+Shift+E]" name="action[]" value="EDIT">Edit</button>', 1); echo edit_button('<button class="block tooltip" accesskey="B" title="Block [Alt+Shift+B]" name="action[]" value="BLOCK" onClick="return confirm(\'Are you sure you want to block user(s)?\')">Block</button>', 1); echo edit_button('<button class="activate tooltip" accesskey="I" title="Activate [Alt+Shift+I]" name="action[]" value="ACTIVATE" onClick="return confirm(\'Are you sure you want to activate user(s)\')">Activate</button>', 1); ?> </div> <table cellpadding="0" cellspacing="0" border="0" id="dataTable"> <thead> <tr> <?php echo edit_checkbox('<th width="23"><input type="checkbox" id="select-all" accesskey="A" title="Select all [Alt+Shift+A]" class="tooltip"></th>', 1); ?> <th>Full name</th> <th>E-mail</th> <th>Username</th> <th>User group</th> <th>Status</th> </tr> </thead>