本文整理汇总了PHP中main::q方法的典型用法代码示例。如果您正苦于以下问题:PHP main::q方法的具体用法?PHP main::q怎么用?PHP main::q使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类main
的用法示例。
在下文中一共展示了main::q方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
<?php
include $_SERVER["DOCUMENT_ROOT"] . "/Lib/php/func.object.php";
include $_SERVER["DOCUMENT_ROOT"] . "/Lib/php/main.object.php";
$main = new main();
if (!isset($_GET["page"]) || $_GET["page"] == "") {
$page = "83";
} else {
$page = $_GET["page"];
}
$topics = $main->get_record($main->pre . "pages", $page, "topics");
$sql_q = "SELECT * FROM " . $main->pre . "pages WHERE publ='0' AND topics='{$topics}' AND pages=''";
$sql_res = $main->q($sql_q);
$rows = mysql_fetch_array($sql_res);
$pages_name = $rows["pages_name"];
if ($page == "catalog" && isset($id) && !isset($cid)) {
$title = $main->upfirst($main->get_record($main->pre . "pages", $id, "pages_name"));
$keywords = "";
$description = "";
} elseif ($page == "catalog" && isset($id) && isset($cid)) {
$title = $main->upfirst($main->get_record("catalog_" . $id, $cid, "cat_title"));
$keywords = "";
$description = "";
} elseif ($page == "search") {
$title = "Поиск";
$keywords = "";
$description = "";
$page_name = "Поиск";
} elseif ($page == "299") {
isset($gpage) && $gpage !== "" ? $gpagename = " - " . $main->get_record("photosgal", $gpage, "galname") : ($gpagename = "");
$page_name = "Фотогалерея" . $gpagename;