function goAction($act, $category_id, $course_id, $courses, $exercises) { if (!$act || $act == null) { $act = "default"; } switch ($act) { case 'default': showPage(); break; case 'getCategory': showCategories(); break; case 'getCategoryJson': showCategoryTree(); break; case 'getCourses': showCourses($category_id); break; case 'getTracks': showTracks($category_id, $course_id); break; case 'getScores': showScores($category_id, $course_id); break; case 'getSummary': showSummary($category_id, $courses, $exercises); break; case 'getExcel': showExcel($category_id, $courses, $exercises); break; case 'getCfgs': showConfig($category_id, $course_id); break; case 'saveCfgs': $count = $_GET['count']; $configs = $_GET['config']; setConfig($category_id, $course_id, $count, $configs); break; case 'createCfgs': $quiz_count = @$_GET['count']; if (!isset($quiz_count) || $quiz_count == null || $quiz_count <= 0) { drawConfigPanel($category_id, $course_id); } else { drawConfigPanel($category_id, $course_id, $quiz_count); } break; case 'removeCfgs': removeConfig($category_id, $course_id); break; case 'getStudents': showStudentConfigs(); break; case 'saveStudents': $students = $_GET['s']; saveStudentConfigs($students); break; } }
function doIndex() { showPage("header"); if (isset($_GET['action'])) { switch ($_GET['action']) { case 'login': include "login.php"; break; case 'recover_password': include "recover_password.php"; break; case "register": include "registration.php"; break; case "hash": include "hash.php"; break; case "activate": include "activation.php"; break; /*case "mail": { mail("*****@*****.**", "costma", "costam"); break; }*/ /*case "mail": { mail("*****@*****.**", "costma", "costam"); break; }*/ case "delete": include "delete_user.php"; break; case "log_out": destroySession(); include "home_page.php"; break; default: include "home_page.php"; break; } } else { include "home_page.php"; } showPage("footer"); }
function check() { $dmenu = def_menu(); $menu = array('Home' => array('Home' => ''), 'Account' => array('Rewards' => 'mpayouts', 'Payments' => 'payments', 'Settings' => 'settings', 'User Settings' => 'userset', '2FA Settings' => '2fa'), 'Workers' => array('Shifts' => 'shifts', 'Shift Graph' => 'usperf', 'Workers' => 'workers', 'Management' => 'workmgt'), 'Pool' => array('Stats' => 'stats', 'Blocks' => 'blocks', 'Graph' => 'psperf', 'Acclaim' => 'userinfo', 'Luck' => 'luck'), 'Admin' => NULL, 'gap' => array('API' => 'api', 'PBlocks' => 'pblocks'), 'Help' => array('Payouts' => 'payout')); tryLogInOut(); $who = loggedIn(); if ($who === false) { $p = getparam('k', true); if ($p == 'reset') { showPage(NULL, 'reset', $dmenu, '', $who); } else { if (requestLoginRegReset() == true) { showPage(NULL, 'reg', $dmenu, '', $who); } else { $p = getparam('k', true); process($p, $who, $dmenu); } } } else { $p = getparam('k', true); process($p, $who, $menu); } }
if ($base_handler) { $result = doInDatabase("SELECT IDu FROM USERS WHERE NICKNAME = \"{$user}\""); if (mysql_fetch_assoc($result)) { return 1; } } else { echo "Nie mozna polaczyc sie z baza </br>"; return 0; } } function signup() { $user = $_GET['username']; $password = $_GET['password']; $mail = $_GET['mail']; if (check($user)) { return "JEST JUŻ TAKI"; } $password = hash("sha256", $password); $random = generateRandomString(64); doInDatabase("INSERT INTO USERS (NICKNAME, PASSWORD, MAIL, CLASS, TEMP_RAND) VALUES (\"{$user}\", \"{$password}\", \"{$mail}\", \"user\", \"{$random}\")"); mail($mail, "Nowe konto", "Musisz aktywować nowe konto, aby to zrobić wejdź w link:</br>\n <a href=\"localhost/my/index.php?action=activate&code={$random}&user={$user}\"> Link </a></br>\n Dziękujemy za rejestrację :P"); return "wysłano wiadomość. sprawdź pocztę"; } if (isset($_GET['username']) && isset($_GET['password']) && isset($_GET['mail'])) { echo signup(); } else { if (!isset($_GET['done'])) { showPage("registration_form"); } }
<?php if ($count == 0) { echo "<center><b>No such information!</b></center>"; } else { ?> <div class="page"> <div class="pagebefore">Current:<?php echo $page; ?> /<?php echo $pagecount; ?> Page EveryPage <?php echo $pagesize; ?> Items</div> <div class="pageafter"> <?php echo showPage("system_log.php", $page, $pagecount, "../images"); ?> <div class="clear"></div> </div> </div> <?php } ?> </div> </div> </div> </body> </html>
if ($count == 0) { echo "<center><b>没有相关信息!</b></center>"; } else { ?> <div class="page"> <div class="pagebefore">当前页:<?php echo $page; ?> /<?php echo $pagecount; ?> 页 每页 <?php echo $pagesize; ?> 条</div> <div class="pageafter"> <?php echo showPage('order_stats.php', $page, $pagecount); ?> <div class="clear"></div> </div> </div> <?php } ?> </div> </div> </div> </body> </html>
$end = $page * $pageSize; if (empty($str)) { echo "<div style='margin:20px' >对不起!您搜索的内容不存在!</div>"; } else { for ($i = $start; $i < $end; $i++) { echo $array[$i]; } } } else { echo "<div style='margin:20px' >对不起!您搜索的内容不存在!</div>"; } ?> <div align="center" style="font-size:15px"><?php echo showPage($page, $totalPage, "keyword={$keyword}"); ?> </div> <div class="clear "></div> </div><!-- END of templatemo_main --> </div><!-- END of templatemo_wrapper --> <div id="templatemo_bottom_wrapper"> <div id="templatemo_bottom"> <?php include_once "./include/link.php"; ?> <div class="clear"></div> </div><!-- END of templatemo_bottom --> </div><!-- END of templatemo_bottom_wrapper -->
<?php if ($count == 0) { echo "<center><b>没有相关信息!</b></center>"; } else { ?> <div class="page"> <div class="pagebefore">当前页:<?php echo $page; ?> /<?php echo $pagecount; ?> 页 每页 <?php echo $pagesize; ?> 条</div> <div class="pageafter"> <?php echo showPage("check_goods.php", $page, $pagecount, "../images"); ?> <div class="clear"></div> </div> </div> <?php } ?> </div> </div> </div> </body> </html>
/** * 生成分页 * @param int $page * @param string $baseUrl * @param array $pageParam * @return string */ public function getPager($page, $baseUrl, $pageParam = array()) { $count = $this->db->get_count($this->table); return showPage($count, $page, $baseUrl, $pageParam); }
<?php if ($count == 0) { echo "<center><b>There is no relevant information!</b></center>"; } else { ?> <div class="page"> <div class="pagebefore">Current page:<?php echo $page; ?> /<?php echo $pagecount; ?> page Each page <?php echo $pagesize; ?> one</div> <div class="pageafter"> <?php echo showPage("search_user.php", $page, $pagecount, "../images"); ?> <div class="clear"></div> </div> </div> <?php } ?> </div> </div> </div> </body> </html>
} else { ?> <div class="page"> <div class="pagebefore">当前页:<?php echo $page; ?> /<?php echo $pagecount; ?> 页 每页 <?php echo $pagesize; ?> 条</div> <div class="pageafter"> <?php echo showPage("check_shop.php", $page, $pagecount, "../images"); ?> <div class="clear"></div> </div> </div> <?php } ?> <br> <a href="check_mall.php">返回查看商场</a> </div> </div> </div> </body> </html> <script>
echo "<div class='message clearfix'><a href='members.php?view=" . $row['auth'] . "'>" . showImage($row['auth']) . "<div class='message-text'>" . $row['auth'] . "</a>"; // public messages if ($row['pm'] == 0) { echo " wrote: "" . $row['message'] . """; } else { echo " whispered: <span class='whisper'><i>"" . $row['message'] . ""</i></span>"; } if (strtolower($row['recip']) == strtolower($user)) { echo "<span class='action'>[<a href='messages.php?erase=" . $row['id'] . "'>erase</a>]</span>"; } echo "<p class='date'>" . date(' M jS \'y g:ia', $row['time']) . "</p>"; echo "</div></div>"; } } echo "<p class='page'>page "; showPage($page, $pages, $href); echo "</p>"; } else { echo "<br><span class='info'>No messages yet</span><br><br>"; } echo "</div><a class='button' href='messages.php?view={$view}'>Refresh messages</a></div>"; echo "</div>"; // message form echo <<<_END <div class='display'> <form class='left' method="post" action="messages.php?view={$view}"> Type here to leave a message:<br> <textarea name="text" cols="40" rows="3"></textarea><br> Public<input type="radio" name="pm" value="0" checked="checked"> Private<input type="radio" name="pm" value="1"> <input class="submit" type="submit" value="Post Message"></form>
function showIndex() { showPage(NULL, 'index', def_menu(), '', false); }
<div class="logo"><img src="themes/<?php echo "{$theme}/logo.png"; ?> "></div> </div> </div> <!-- MAIN --> <div id="main"> <div class="content"> <?php $urlParameters = getUrlParameters(); if ($urlParameters["namedpage"]) { showPage($urlParameters["namedpage"]); } elseif ($urlParameters["blogentry"]) { showEntry($urlParameters["blogentry"], FALSE); } else { $numEntriesPrinted = showOverview($urlParameters["blogpage"], $entriesPerPage); } ?> </div> <div class="pagelink"> <?php if (!$urlParameters["blogentry"] and !$urlParameters["namedpage"] and $numEntriesPrinted != 0 and $blogpage > 1 | $showNextPage) { if ($blogpage > 1) { echo "<a href=\"index.php?blogpage=" . ($blogpage - 1) . "\"><<</a>"; } echo "page " . $blogpage;
$totalPage = ceil($totleRows / $pageSize); $page = $_REQUEST['page'] ? $_REQUEST['page'] : 1; if ($page < 1 || $page == null || !is_numeric($page)) { $page = 1; } if ($page >= $totalPage) { $page = $totalPage; } $offset = ($page - 1) * $pageSize; $sql = "select * from imooc_admin limit {$offset}, {$pageSize}"; $rows = fetchAll($sql); foreach ($rows as $key => $row) { echo $row['id'] . '-----' . $row['username']; echo "<br>"; } echo showPage($page, $totalPage, "cid=5&pid=6"); function showPage($page, $totalPage, $where = null, $sep = " ") { $where = $where == null ? null : "&" . $where; $url = $_SERVER['PHP_SELF']; $index = $page == 1 ? "首页" : "<a href='{$url}?page=1{$where}'>首页</a>"; $last = $page == $totalPage ? "尾页" : "<a href='{$url}?page={$totalPage}{$where}'>尾页</a>"; $prev = $page == 1 ? "上一页" : "<a href='{$url}?page=" . ($page - 1) . "{$where}'>上一页</a>"; $next = $page == $totalPage ? "下一页" : "<a href='{$url}?page=" . ($page + 1) . "{$where}'>下一页</a>"; $str = "总共{$totalPage}页/当前是{$page}页"; for ($i = 1; $i < $totalPage; $i++) { var_dump($i); if ($i == $page) { $p .= "[{$page}]"; } else { $p .= "<a href='{$url}?page={$i}{$where}'>[{$i}]</a>";
exit; } foreach($rows as $row): ?> <tr> <td width="15%"> [<b><?php echo $row['classname'];?>]</b> </td> <td width="30%"><?php echo $row["title"];?></td> <td><?php echo $row['subdate']; ?></td> <td> <a href='edit_article.php?id=<?php echo $row['articleid'];?>' class="btn btn-info">修改</a> <a href="do.php?id=<?php echo $row['articleid'];?>&act=delarticle" onclick="{if(confirm('确定要删除吗?')){return true;}return false;}" class="btn btn-danger">删除</a> </td> </tr> <?php endforeach?> <tr> <td colspan="3"> </td> <td> </td> </tr> </tbody> </table> <nav> <ul class='pagination'> <?php echo showPage('list_article.php','?',$page, $totalPage);?> </ul> </nav> </body> </html>
exit; } if (isset($url[1]) && isset($url[2])) { if ($url[1] == 'tag') { $pageFound = showTagPages($META, $url[2], isset($url[3]) ? (int) $url[3] : 1, 0, false); } else { if ($url[1] == 'p') { $pageFound = showPage($META, (int) $url[2] - 1); } } } if (!$pageFound && isset($url[1]) && isset($META[$url[1]])) { $pageFound = showPost($META[$url[1]][1], "", $META[$url[1]][0], $META[$url[1]][2], $META[$url[1]][3]); } if (!$pageFound) { showPage($META, 0); } //showPost("DiglettCMS", "" , "content/main.txt", "", ""); function showRss($META) { echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rss version=\"2.0\">\n\n<channel>\n"; echo "<title>" . getSiteTitle() . "<title>\n"; echo "<link>" . getBaseUrl() . "<link>\n"; echo "<description>" . getSiteDescription() . "<description>\n"; foreach ($META as $k => $m) { if (file_exists($m[0])) { echo "\t<item>\n\t\t<title>" . $m[1] . "</title>\n\t\t<link>" . getBaseUrl() . $k . "</link>\n\t\t<description>" . file_get_contents($m[0]) . "</description>\n\t\t<pubDate>" . date("D, d M y H:i:s O", strtotime($m[4])) . "</pubDate>\n\t</item>\n"; } } echo "</channel>\n\n</rss>\n"; return true;
<?php if ($count == 0) { echo "<center><b>There is no relevant information!</b></center>"; } else { ?> <div class="page"> <div class="pagebefore">Current page:<?php echo $page; ?> /<?php echo $pagecount; ?> page Each page <?php echo $pagesize; ?> one</div> <div class="pageafter"> <?php echo showPage("manage_focus.php", $page, $pagecount, "../images"); ?> <div class="clear"></div> </div> </div> <?php } ?> </div> </div> </div> </body> </html>
<?php require_once( "portal.php"); showPage(); ?>
} else { ?> <div class="page"> <div class="pagebefore">Current page:<?php echo $page; ?> /<?php echo $pagecount; ?> page Each page <?php echo $pagesize; ?> one</div> <div class="pageafter"> <?php echo showPage("../goods_manage/check_goods.php", $page, $pagecount, "../images"); ?> <div class="clear"></div> </div> </div> <?php } ?> <br> <a href="<?php echo $url; ?> ">Return to see the store</a> </div> </div> </div>
echo $row['id']; ?> )"><input type="button" value="删除" class="btn" onclick="delCity(<?php echo $row['id']; ?> )"></td> </tr> <?php } ?> <?php if ($totalRows > $pageSize) { ?> <tr> <td colspan="4"><?php echo showPage($page, $totalPage); ?> </td> </tr> <?php } ?> </tbody> </table> </div> </body> <script type="text/javascript"> function addCity(){ window.location="addCity.php"; }
// PAGE TITLE $configItems["title"] = "<title>Janrain Enterprise with Badgeville</title>"; // PAGE CONTENT // $configItems["content"] = ""; // The default value for content is determined by $typeOfDemo /*************** ENTERPRISE DEMO SETTINGS ***************/ // PATH TO janrain-init // $configItems["janrain-init"] = "<script src = '" . $webPath . "scripts/janrain-init.js'></script>"; // PATH TO janrain-utils // $configItems["janrain-utils"] = "<script src = '" . $webPath . "scripts/janrain-utils.js'></script>"; // PATH TO LINKS // $configItems["links"] = $defaultPath . "templates/links.html"; // PATH TO WIDGET SCREENS // $configItems["widgetScreens"] = $defaultPath . "templates/widgetScreens.html"; /*************** SOCIAL-AJAX *****************/ // $configItems["socialLoginScript"] = $paths["templates"] . "/socialLogin.html"; // $configItems["janrainSettings"] = $paths["default"] . "/scripts/social/ajax/settings.html"; // $configItems["ajaxScript"] = $paths["default"] . "/scripts/social/ajax/ajax.php"; // $configItems["errorChecking"] = $paths["default"] . "/scripts/social/ajax/errorChecking.html"; // $configItems["jwol"] = $paths["default"] . "/scripts/social/ajax/jwol.html"; /************** SOCIAL-REDIRECT **************/ // PATH TO ANY OTHER SCRIPTS YOU WANT TO ADD // Scripts should all be in a single html file // enclosed by <script></script> tags. // Note: default value is empty. $configItems["otherScripts"] = "scripts.html"; /*************** SOCIAL LOGIN SETTINGS ************/ // $configItems["tokenURL"] = $paths["templates"] . "/tokenURL.php"; // $configItems["tokenURL"] = "http://www.sampleTokenUrl.com/not-needed-for-client-side-validation"; showPage($configItems, $typeOfDemo);
<?php /** * User: Hans-Gert Gräbe * Date: 2015-07-26 */ require_once "layout.php"; require_once "php/Conferences.php"; $content = ' <div class="container"> <h1 align="center">Past Conferences</h1> <p>The following list of Past CA Conferences is extracted from the <a href="http://symbolicdata.org/Data/PastConferences/" >CASN Past Conferences Database</a>. The heading of each conference entry links to the corresponding CASN Database entry that may contain more information (organizers, invited speakers, deadlines etc.) about the conference. </p> <p>The information is displayed for the year 2012. Use HTTP Get Parameter as in <code>info/pc.php?year=2002</code> to display available information for another year. </p> ' . pastConferences() . ' </div> '; echo showPage($content);
if ($count == 0) { echo "<center><b>没有相关信息!</b></center>"; } else { ?> <div class="page"> <div class="pagebefore">当前页:<?php echo $page; ?> /<?php echo $pagecount; ?> 页 每页 <?php echo $pagesize; ?> 条</div> <div class="pageafter"> <?php echo showPage('sum_order.php', $page, $pagecount, "../images"); ?> <div class="clear"></div> </div> </div> <?php } ?> </div> </div> </div> </body> </html>
<td colspan="2"><input type="submit" value="查询" /></td> </table> </form> </td> </tr> <?php $i++; } ?> <!-- "$i++;" not know why --> <?php if ($totalRows > $pageSize) { ?> <tr> <td colspan="7"><?php echo showPage($page, $totalPage, "keywords={$keywords}&order={$order}"); ?> </td> </tr> <?php } ?> </tbody> </table> </div> <script src="../jquery/external/jquery/jquery.js"></script> <script src="../jquery/jquery-ui.js"></script> <script> $( "#datepicker1" ).datepicker({ inline: true });
?> <input type="hidden" name="i" value="<?php echo $i; ?> " /> </table> </form> <div class="page"> <div class="pagebefore">当前页:<?php echo $page; ?> /<?php echo $pagecount; ?> 页 每页 <?php echo $pagesize; ?> 条</div> <div class="pageafter"> <?php echo showPage("list.php", $page, $pagecount, "/admin_manage/images"); ?> <div class="clear"></div> </div> </div> </div> </div> </div> </body> </html>
} else { ?> <div class="page"> <div class="pagebefore">当前页:<?php echo $page; ?> /<?php echo $pagecount; ?> 页 每页 <?php echo $pagesize; ?> 条</div> <div class="pageafter"> <?php echo showPage("manage_account.php", $page, $pagecount, "../images"); ?> <div class="clear"></div> </div> </div> <?php } ?> </div> </div> </div> </body> </html> <script> function check(admin_manager_id) {
} } #echo "Starting Transformation...\n"; $xt->transformData($feed->toString()); #echo "Done.\n"; $output = '<' . '?xml version="1.0" encoding="utf-8"?' . ">\n" . normalizeLineEndings($xt->toString(), "\n"); $ua = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; $subtype = preg_match('/Version\\/5[.0-9]*\\sSafari/', $ua) ? 'octet-stream' : 'atom+xml'; header('Content-type: application/' . $subtype); header('Content-disposition: attachment;filename=' . $feed->getFilename()); echo $output; #echo $feed->toString(); #echo "DONE.\n"; } catch (Exception $e) { echo "<pre>Exception caught: " . $e->getMessage() . "</pre>\n"; } } try { /*if (chdir('..')) echo getcwd() . "\n"; else echo "chdir failed. :(\n";*/ $feed = new FeatureFeed("../features.atom"); if ($_SERVER['REQUEST_METHOD'] == 'POST') { generateNewFeed($feed); } else { showPage($feed); } } catch (Exception $e) { echo "<pre>Caught Exception: " . $e->getMessage() . "</pre>\n"; }
showPage($_SESSION['username'], $_SESSION['access'], validateNewRefund()); } //if errors exist, show page again & fill in values } else { //form has not been submitted showPage($_SESSION['username'], $_SESSION['access']); //show page if user is logged in } } else { showLogin('The current user is not authorized to view this page.'); //unauthenticated users get OWNED!! } } elseif ($_POST['username']) { //if user has attempted to login, validate login if (validateLogin($_POST['username'], $_POST['password'])) { showPage($_SESSION['username'], $_SESSION['access']); //valid user! Show page! } else { showLogin('Login invalid. Please try again'); } } else { //Else show login screen (no user is logged in and no login attempt has been made) showLogin(); } function uploadFiles() { /* array (size=17) 'amount' => string '321' (length=3) 'payable' => string 'me' (length=2) 'addr_ln_1' => string '16 P' (length=4)
<td class='center'><?php echo $spendvalueTotal1; ?> </td> <td class='center'><?php echo $getvalueTotal1; ?> </td> </tr> <?php } ?> </table> <?php if ($pagecount > 1) { echo showPage("shopturnover.php?DeliverTotal=" . $orderDeliverTotal . "&ALLTotal1=" . $orderALLTotal1 . "&MoneyTotal1=" . $orderMoneyTotal1 . "&valueTotal1=" . $getvalueTotal1 . "&spendvalueTotal1=" . $spendvalueTotal1 . $url1, $page, $pagesize, $rscount, $pagecount); } ?> </div> </div> </div><!--topBox完--> </div> <div class="clear"></div> </div> <div class="main_bottom"></div> </div><!--main_content完--> </div>