当前位置: 首页>>代码示例>>PHP>>正文


PHP show_page函数代码示例

本文整理汇总了PHP中show_page函数的典型用法代码示例。如果您正苦于以下问题:PHP show_page函数的具体用法?PHP show_page怎么用?PHP show_page使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了show_page函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: delete_form

 function delete_form($f3)
 {
     if (!$this->check_empty($f3)) {
         throw new \Exception('Not Empty');
     }
     show_page($f3, $this->template_name() . '.delete');
 }
开发者ID:neyre,项目名称:tools.olin.edu,代码行数:7,代码来源:base.php

示例2: route_request

function route_request()
{
    $cmd = grab_request_var("cmd", "");
    switch ($cmd) {
        case "Update Configuration":
            update_worker_cfg();
            break;
        case "Start Worker":
            control_worker("start");
            break;
        case "Restart Worker":
            control_worker("restart");
            break;
        case "Attempt to Start Worker":
            control_worker("start");
            break;
        case "Stop Worker":
            control_worker("stop");
            break;
        case "top":
            show_gearman_top();
            break;
        default:
            break;
    }
    // always show page
    show_page();
}
开发者ID:hedenface,项目名称:ModGearmanXIManager,代码行数:28,代码来源:modgearmanxi.php

示例3: process_form

function process_form()
{
    if ($_POST['xsrf_token'] != $_SESSION['xsrf_token']) {
        show_page('Huh? ERROR: big kablooie');
        return;
    }
    $query = 'SELECT id, name FROM users WHERE id="' . mysqli_real_escape_string(DB::get(), $_POST['account_id']) . '"';
    $result = DB::queryRaw($query);
    if (mysqli_num_rows($result) != 1) {
        show_page('Nonexistent ID');
        return;
    }
    $row = mysqli_fetch_assoc($result);
    $id = $row['id'];
    $name = $row['name'];
    // ** FORM VALIDATED AT THIS POINT **
    // perform elevation
    $query = 'UPDATE users SET permissions="A", approved="1" WHERE id="' . $id . '" LIMIT 1';
    DB::queryRaw($query);
    // show confirmation page
    page_header('Super-Admin');
    echo <<<HEREDOC
      <h1>Super-Admin</h1>
      
      <span class="b">{$name}</span> was approved and elevated. Now clear the Super-Admin password.
HEREDOC;
    //$names[0] = 'Super-Admin';
    //$pages[0] = '';
    //page_footer($names, $pages);
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:30,代码来源:Super_Admin.php

示例4: index

 public function index()
 {
     $this->Purview_model->checkPurview($this->tablefunc);
     $post = $this->input->post(NULL, TRUE);
     $getwhere = array();
     $search['type'] = trim($post['type']);
     $search['keyword'] = trim($post['keyword']);
     $search['searchtype'] = trim($post['searchtype']);
     if ($search['type'] != '') {
         $getwhere['type'] = $search['type'];
     }
     if ($search['searchtype'] == 'id') {
         if ($search['keyword'] != '') {
             $getwhere[$search['searchtype']] = $search['keyword'];
         }
     } else {
         if ($search['keyword'] != '') {
             $getwhere[$search['searchtype'] . ' like'] = '%' . $search['keyword'] . '%';
         }
     }
     $pagearr = array('currentpage' => isset($post['currentpage']) && $post['currentpage'] > 0 ? $post['currentpage'] : 1, 'totalnum' => $this->Data_model->getDataNum($getwhere), 'pagenum' => 20);
     $data = $this->Data_model->getData($getwhere, 'type,listorder,id desc', $pagearr['pagenum'], ($pagearr['currentpage'] - 1) * $pagearr['pagenum']);
     $res = array('tpl' => 'list', 'tablefunc' => $this->tablefunc, 'search' => $search, 'typearr' => $this->typearr, 'liststr' => $this->_setlist($data, true), 'pagestr' => show_page($pagearr, $search), 'funcstr' => $this->Purview_model->getFunc($this->tablefunc, $this->funcarr));
     $this->load->view($this->tablefunc, $res);
 }
开发者ID:pondyond,项目名称:x6cms,代码行数:25,代码来源:tpltags.php

示例5: index

 function index($f3)
 {
     $D = \R::findAll('toolgroups', 'ORDER BY sort_priority DESC, displayname ASC');
     foreach ($D as $key => $element) {
         $D[$key]->with("ORDER BY displayname ASC")->ownTools;
     }
     $f3->set('data', \R::exportAll($D));
     show_page($f3, 'tools.index');
 }
开发者ID:neyre,项目名称:tools.olin.edu,代码行数:9,代码来源:tools.php

示例6: index

 public function index()
 {
     $this->Purview_model->checkPurview($this->tablefunc);
     $post = $this->input->post(NULL, TRUE);
     $pagearr = array('currentpage' => isset($post['currentpage']) && $post['currentpage'] > 0 ? $post['currentpage'] : 1, 'totalnum' => $this->Data_model->getDataNum(), 'pagenum' => 20);
     $data = $this->Data_model->getData('', 'listorder', $pagearr['pagenum'], ($pagearr['currentpage'] - 1) * $pagearr['pagenum']);
     $res = array('tpl' => 'list', 'tablefunc' => $this->tablefunc, 'liststr' => $this->_setlist($data, true), 'pagestr' => show_page($pagearr, ''), 'funcstr' => $this->Purview_model->getFunc($this->tablefunc, $this->funcarr));
     $this->load->view($this->tablefunc, $res);
 }
开发者ID:pondyond,项目名称:x6cms,代码行数:9,代码来源:lang.php

示例7: index

 function index($f3)
 {
     $D = \R::findOne('tools', 'name=?', array($f3->get('PARAMS.name')));
     $D->with('ORDER BY id')->ownImages;
     if ($D) {
         $exportTmp = \R::exportAll($D);
         $f3->set('data', $exportTmp[0]);
     } else {
         $f3->set('data', '');
     }
     show_page($f3, $this->template_name() . '.index');
 }
开发者ID:neyre,项目名称:tools.olin.edu,代码行数:12,代码来源:images.php

示例8: show_page

function show_page($post_id = 0, $post_level = 0) { // 取得層數方便下標題
    echo '<article class="article-content"><h' . ($post_level + 2) . ' class="article-title"><a href="' . get_permalink($post_id) . '">' . get_the_title($post_id) . '</a></h' . ($post_level + 2) . '><div class="thumbnail-img">';
    the_post_thumbnail('large');
    echo '</div>';
    the_content();
    if (is_page()) { //取得子網頁
        $args = array(
            'post_status' => 'publish',
            'post_type' => 'page',
            'post_parent' => $post_id,
            'orderby' => 'menu_order',
            'order' => 'ASC',
            'nopaging' => true,
        );
        tcc_attachments($post_id);
        $pages = get_posts($args);
        foreach ($pages as $post) {
            setup_postdata($post);
            show_page($post->ID, $post_level + 1);
        }
    }
    echo '<div class="clearfix"></div></article>';
}
开发者ID:TCCinTaiwan,项目名称:KUAS_CSIE_Wordpress_Themes_TCC-Department,代码行数:23,代码来源:functions.php

示例9: delete

 function delete($f3)
 {
     if (!($user = \R::findOne('users', 'username=?', array(strtolower($f3->get('POST.username')))))) {
         throw new \Exception('Could not find user');
     }
     if (!($tool = \R::findOne('tools', 'name=?', array(strtolower($f3->get('POST.tool')))))) {
         throw new \Exception('Could not find tool');
     }
     if (!($records = \R::find('trainings', 'users_id=? AND tools_id=? AND level=?', array($user->id, $tool->id, strtoupper($f3->get('POST.level')))))) {
         throw new \Exception('Could not any training records for this user on this tool at this level.');
     }
     \R::trashAll($records);
     $f3->set('messages', array('All Records of User ' . $user->username . ' on Tool ' . $tool->name . ' at Level ' . strtoupper($f3->get('POST.level')) . ' deleted.'));
     show_page($f3, 'messages');
 }
开发者ID:neyre,项目名称:tools.olin.edu,代码行数:15,代码来源:trainings.php

示例10: show_links

<!--
Quick links page
By Kulvinder Lotay and Artur Barbosa
-->
<!DOCTYPE html>
<html>
<?php 
# Connect to MySQL server and the database
require 'includes/connect_db.php';
# Includes these helper functions
require 'includes/helpers.php';
# Store current page in variable, call show_links and show_records functions using cur_page variable
$cur_page = $_SERVER['PHP_SELF'];
show_links($dbc, $cur_page);
# Show the records
show_page($cur_page, $dbc);
# If user requests item (clicks quick link) make the appropriate GET request from quick links
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
    if (isset($_GET['id']) && isset($_GET['p'])) {
        if ($_GET['p'] == 3) {
            show_record_admin($dbc, $_GET['id'], $_GET['p']);
        } else {
            show_record($dbc, $_GET['id'], $_GET['p']);
        }
    }
} else {
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        if ($_POST['dialog'] == 'contact') {
            $errors = array();
            $from = trim($_POST['email']);
            $message = trim($_POST['msg']);
开发者ID:kslotay,项目名称:Limbo-Lost-and-Found-Database-System,代码行数:31,代码来源:ql.php

示例11: show_form

                    } else {
                        show_form('passreset', translate('Please enter your own email address.', sz_config('language')));
                    }
                } else {
                    show_form('passreset', translate('You have entered an invalid email address. Please try again.', sz_config('language')));
                }
            } else {
                show_form('passreset', '');
            }
        }
        break;
    default:
        if ($nrgic == 'showregmsg') {
            show_msg(translate('Your request has been forwarded. We will notify you as soon as you can register again.', sz_config('language')));
        }
        show_page('index');
        break;
}
//BEGIN FUNCTIONS
function blankRegForm($msg)
{
    $newuser = array();
    $newuser['username'] = '';
    $newuser['fullnames'] = '';
    $newuser['group'] = '';
    $newuser['phone'] = '';
    $newuser['user_website'] = '';
    $newuser['email'] = '';
    $newuser['referred_by'] = $_SESSION['ref'];
    registerForm($msg, $newuser);
}
开发者ID:hscale,项目名称:SiteZilla,代码行数:31,代码来源:index.php

示例12: exit

    DB::setDbName($config["db_name"]);
}
if (isset($config["db_user"])) {
    DB::setDbUser($config["db_user"]);
}
if (isset($config["db_pass"])) {
    DB::setDbPass($config["db_pass"]);
}
// pridáme si ďalšie súbory s funkciami, ktoré budeme používať
require_once APP_PATH . "/functions/general.php";
require_once APP_PATH . "/functions/message.php";
require_once APP_PATH . "/functions/auth.php";
require_once APP_PATH . "/functions/tasks.php";
// naštartujeme session potrebné pre prihlásenie a správičky
if (!session_id()) {
    @session_start();
}
// podstránky ktoré sú dostupné
if (!file_exists(APP_PATH . "/routes.php")) {
    exit("Application error: Routes not found.");
}
$routes = (include APP_PATH . "/routes.php");
// v prvom segmente url máme podstránku
$page = segment(1);
// ak taká podstránka neexistuje v našom poli dostupných podstránok, tak zobrazíme 404 stránku
if (!isset($routes[$page])) {
    show_404();
}
// inak ju zobrazíme
show_page($routes[$page]);
开发者ID:petrofcikmatus,项目名称:simple-todo,代码行数:30,代码来源:app.php

示例13: process_form

function process_form()
{
    if ($_POST['xsrf_token'] != $_SESSION['xsrf_token']) {
        trigger_error('XSRF code incorrect', E_USER_ERROR);
    }
    if (isset($_POST['guts_full_update_a']) || isset($_POST['guts_full_update_b']) || isset($_POST['guts_full_update_c'])) {
        process_special_form();
    }
    // and don't come back
    $set = null;
    for ($n = 1; $n < 12; $n++) {
        if (isset($_POST['guts_full_update_' . $n])) {
            $set = $n;
        }
    }
    if (is_null($set)) {
        trigger_error('No button clicked', E_USER_ERROR);
    }
    if ($_POST[$set] == 'None') {
        $score = NULL;
    } else {
        $score = (int) htmlentities($_POST[$set]);
        if ($score < 0 || $score > 3) {
            trigger_error('Invalid score?!', E_USER_ERROR);
        }
    }
    if ($_POST['previous_value_' . $set] == 'None') {
        $row = DB::queryFirstRow('SELECT COUNT(*) FROM guts WHERE problem_set="' . mysqli_real_escape_string(DB::get(), $set) . '" AND team="' . mysqli_real_escape_string(DB::get(), $_GET['ID']) . '"');
        if ($row['COUNT(*)'] != '0') {
            show_page('The value of that field has changed. Make sure no ' . 'one else is currently entering scores for this team, and ' . 'try again.');
        }
        if (!is_null($score)) {
            DB::queryRaw('INSERT INTO guts (team, problem_set, score) VALUES ("' . mysqli_real_escape_string(DB::get(), $_GET['ID']) . '", "' . mysqli_real_escape_string(DB::get(), $set) . '", "' . mysqli_real_escape_string(DB::get(), $score) . '")');
        }
    } else {
        $result = DB::queryRaw('SELECT score FROM guts WHERE problem_set="' . mysqli_real_escape_string(DB::get(), $set) . '" AND team="' . mysqli_real_escape_string(DB::get(), $_GET['ID']) . '"');
        if (mysqli_num_rows($result) == 0) {
            show_page('The value of that field has changed. Make sure no ' . 'one else is currently entering scores for this team, and ' . 'try again.');
        }
        if (is_null($score)) {
            DB::queryRaw('DELETE FROM guts WHERE team="' . mysqli_real_escape_string(DB::get(), $_GET['ID']) . '" AND problem_set="' . mysqli_real_escape_string(DB::get(), $set) . '" LIMIT 1');
        } else {
            DB::queryRaw('UPDATE guts SET score="' . mysqli_real_escape_string(DB::get(), $score) . '" WHERE team="' . mysqli_real_escape_string(DB::get(), $_GET['ID']) . '" AND problem_set="' . mysqli_real_escape_string(DB::get(), $set) . '"');
        }
    }
    alert('The score for set ' . $set . ' has been updated', 1);
    header('Location: ' . $_SERVER['REQUEST_URI']);
    die;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:49,代码来源:Full.php

示例14: PrintUnread

    function PrintUnread()
    {
        ?>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
			<td width="29"><img alt="" src="http://<?php 
        echo img_domain;
        ?>
/forum/menu/2.gif"><img alt="" src="http://<?php 
        echo img_domain;
        ?>
/forum/menu/1.gif"></td>
			<td background="http://<?php 
        echo img_domain;
        ?>
/forum/menu/2.gif"><span style="color:white;font-size:11px;">Все непрочитанные тобой темы</span></td>
			<td width="40" background="http://<?php 
        echo img_domain;
        ?>
/forum/menu/2.gif"><img src="http://<?php 
        echo img_domain;
        ?>
/forum/menu/3.gif"></td>
			</tr>
		</table>
		<?php 
        $str_where = $this->MakePermissionForTopic();
        $str_query_select = "SELECT\n\t\tforum_topics.view AS view,\n\t\tforum_topics.id AS topic_id,\n\t\tforum_topics.otv AS otv, \n\t\tforum_topics.top AS topic_top,\n\t\tforum_topics.text AS text,\n\t\tforum_topics.last_user AS last_user, \n\t\tforum_topics.last_date AS last_date,\n\t\tforum_topics.stat AS stat,\n\t\tforum_topics.user_id AS user_id,\n\t\tforum_name.name AS last_name,\n\t\tforum_kat.name AS kat_name,\n\t\tforum_main.name AS  main_name";
        $str_query_count = "SELECT COUNT(*)";
        $str_query_from = " FROM forum_kat,forum_topics,forum_otv,forum_name,forum_main\n\t\tWHERE\n\t\t\t(\n\t\t\tforum_kat.id = forum_topics.kat_id AND\n\t\t\tforum_main.id = forum_kat.main_id AND\n\t\t\tforum_name.user_id=forum_topics.last_user AND\n\t\t\tforum_topics.id = forum_otv.topics_id AND\n\t\t\tforum_topics.id NOT IN (SELECT topic_id FROM forum_read WHERE user_id=" . $this->char['user_id'] . ")\n\t\t\t{$str_where}\n\t\t\t)\n\t\tGROUP BY forum_topics.id";
        $sel = myquery($str_query_select . $str_query_from);
        if (mysql_num_rows($sel) > 0) {
            if (!isset($_GET['page'])) {
                $page = 1;
            } else {
                $page = (int) $_GET['page'];
            }
            $line = 25;
            $allpage = ceil(mysql_result($sel, 0, 0) / $line);
            if ($page > $allpage) {
                $page = $allpage;
            }
            if ($page < 1) {
                $page = 1;
            }
            $selpage = myquery($str_query_select . $str_query_from . " order by forum_topics.last_date DESC limit " . ($page - 1) * $line . ", {$line}");
            $this->PrintListTopic($selpage);
            ?>
			<table style="width:100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				<td height="25" style="background-image:url(http://<?php 
            echo img_domain;
            ?>
/forum/menu/bg2.gif)" align="center">
				<?php 
            $href = "?act=show_unread&amp;";
            echo 'Страница: ';
            show_page($page, $allpage, $href);
            ?>
				</td>
				</tr>
			</table>
		<?php 
        }
        ?>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
			<td width="29"><img alt="" src="http://<?php 
        echo img_domain;
        ?>
/forum/menu/2.gif"><img alt="" src="http://<?php 
        echo img_domain;
        ?>
/forum/menu/1.gif"></td>
			<td background="http://<?php 
        echo img_domain;
        ?>
/forum/menu/2.gif">&nbsp;</td>
			<td width="40" background="http://<?php 
        echo img_domain;
        ?>
/forum/menu/2.gif"><img src="http://<?php 
        echo img_domain;
        ?>
/forum/menu/3.gif"></td>
			</tr>
		</table>
		<?php 
    }
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:89,代码来源:forum.class.php

示例15: show_page

// *********************************************
//	show_page
//
//	@brief Show poet page.
//
//	@param $id Poet user ID.
//
// *********************************************
function show_page($id)
{
    echo '<div class="poems">';
    echo '<p class="poet_name">';
    // Show poet username as a link.
    echo '<a href="rss.php?poet_id=' . $id . '">';
    echo '<img src="graphics/rss.gif" class="rss"></a>&nbsp;&nbsp;&nbsp;';
    echo '<a href="show_poet_info.php?id=' . $id . '">';
    echo get_poet_username($id);
    echo '</a>';
    echo '</p>';
    // Show poet poems.
    show_poems($id);
    echo '</div>';
}
session_start();
require 'general_functions.php';
create_site_top();
create_top_menu();
// Get user ID.
$id = get_id($db, $_GET);
show_page($id);
create_site_bottom();
开发者ID:stargazers,项目名称:Runosydan,代码行数:31,代码来源:poet.php


注:本文中的show_page函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。