> $p = addslashes(strip_tags($_GET['p'])); //same as $s, but will hold the end point for the query e.g., 60 << NOT USED YET! >> $sp_page['body'] = ""; db_login(); //function to login to database if (!$c) { $sql = "SELECT id,description,title,name,count,category FROM sa_page2 WHERE public = 'yes' ORDER BY arrykey ASC LIMIT " . $cfg['main_max']; //no value for $c, so no category selected, latest 5 //$text_latest = " Latest " . $cfg['main_max'] . " Articles
\n"; } else { $sql = "SELECT id,description,title,name,count,category FROM sa_page2 WHERE category = '$c' && public = 'yes' ORDER BY arrykey ASC"; //fixed a bug that only displayed the last 5 articles when a category was selected; it should display all $page_title = "» " . stripslashes($c); $page_where = "» " . urldecode(stripslashes($c)) . ""; $text_latest = "    •大学名カテゴリ : " . stripslashes($c) . "


\n\n\n\n"; //echo $sql; } $cat_sql = "SELECT name FROM sa_category"; $cat = @mysql_query($cat_sql) or die("Getting Categories error: " . mysql_error()); $category = mysql_num_rows($cat); if ($category == "0") { echo "ERROR: No categories in database!"; } else { if ($c != "") { //$sp_page['body'] = $sp_page['body'] . "
現在ページ : " . $c . "

"; } // $sp_page['body'] = $sp_page['body'] . "
\n   \n  \n   大学名 : "; while ($db = mysql_fetch_array($cat)) { $cat_name = stripslashes($db['name']); //$sp_page['body'] = $sp_page['body'] . "" . $cat_name . "\n  \n  "; $cat_name_ = $cat_name_ ."
  • " . $cat_name . "
  • "; } // $sp_page['body'] = $sp_page['body'] . "
    (ご覧になりたい大学をクリックしてください。)


    \n"; } //\n\n"; // } $query = @mysql_query($sql) or die("mySQL error: " . mysql_error()); //executes the query, and if there is an error, die and report the error $r = mysql_num_rows($query); if (!$r) { //none $sp_page['body'] = $sp_page['body'] . "No articles in database, if you selected a category than it is empty."; } else { //some found $sp_page['body'] = $sp_page['body'] . $text_latest . ""; } mysql_close(); //closes the mySQL DB connection $mobile = !!(FALSE !== strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'mobile')); if($mobile>0) { $mobile_banner=""; }else{ $mobile_banner=""; } $sp_page['title'] = $cfg['site_title'] . "» Home" . $page_title; $sp_page['where'] = " Home" . $page_where . "

    2018年度関関同立解答速報


    ".$mobile_banner."

    "; ?> <? echo $sp_page['title']; // this will output the pages title?> 2018年度 関関同立 解答速報
    " . $cfg['site_title'] . " echo ""; echo $sp_page['where']; echo $sp_page['body']; // this will output the 'body' for the page echo $cfg['copyright']; // leave this, as it is the copyright that has to be displayed on every page ?>