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


PHP show函数代码示例

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


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

示例1: top_match

function top_match()
{
    global $db, $allowHover, $llwars, $picformat, $sql_prefix;
    $qry = db("SELECT s1.datum,s1.cid,s1.id,s1.bericht,s1.xonx,s1.punkte,s1.gpunkte,s1.squad_id,s2.icon,s2.name FROM " . $db['cw'] . " AS s1\n             LEFT JOIN " . $db['squads'] . " AS s2 ON s1.squad_id = s2.id\n             WHERE `top` = '1'\n             ORDER BY RAND()");
    if ($get = _fetch($qry)) {
        //Clans Mod
        $clandetailssql = db("SELECT clantag, gegner FROM " . $sql_prefix . "clans WHERE id LIKE " . $get['cid']);
        $clans = _fetch($clandetailssql);
        $squad = '_defaultlogo.jpg';
        $gegner = '_defaultlogo.jpg';
        foreach ($picformat as $end) {
            if (file_exists(basePath . '/inc/images/clanwars/' . $get['cid'] . '_logo.' . $end)) {
                $gegner = $get['cid'] . '_logo.' . $end;
            }
            if (file_exists(basePath . '/inc/images/squads/' . $get['squad_id'] . '_logo.' . $end)) {
                $squad = $get['squad_id'] . '_logo.' . $end;
            }
        }
        if ($allowHover == 1 || $allowHover == 2) {
            $hover = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['name'])) . '<br/>vs.<br/> ' . jsconvert(re($clans['gegner'])) . '</td></tr><tr><td><b>' . _played_at . ':</b></td><td>' . date("d.m.Y H:i", $get['datum']) . _uhr . '</td></tr><tr><td><b>' . _cw_xonx . ':</b></td><td>' . jsconvert(re($get['xonx'])) . '</td></tr><tr><td><b>' . _result . ':</b></td><td>' . cw_result_nopic_raw($get['punkte'], $get['gpunkte']) . '</td></tr><tr><td><b>' . _comments_head . ':</b></td><td>' . cnt($db['cw_comments'], "WHERE cw = '" . $get['id'] . "'") . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
        }
        $topmatch .= show("menu/top_match", array("id" => $get['id'], "clantag" => re(cut($clans['clantag'], $llwars)), "team" => re(cut($get['name'], $llwars)), "game" => substr(strtoupper(str_replace('.' . $icon, '', re($get['icon']))), 0, 5), "id" => $get['id'], "gegner" => $gegner, "squad" => $squad, "hover" => $hover, "info" => $get['datum'] > time() ? date("d.m.Y", $get['datum']) : cw_result_nopic($get['punkte'], $get['gpunkte'])));
    }
    return empty($topmatch) ? '<center style="margin:3px 0">' . _no_top_match . '</center>' : '<table class="navContent" cellspacing="0">' . $topmatch . '</table>';
}
开发者ID:BlueTeck,项目名称:dzcp-clanwar-gegnerdatenbank,代码行数:25,代码来源:top_match.php

示例2: debugRequest

/**
 * Remember that this is not sanitized and should be commented out of your code when done using
 */
function debugRequest()
{
    echo "Echoing for debug:<br>";
    echo "You should see 'DONE' line at the end if all is successful<br>";
    function show($arr, $label = "")
    {
        echo "{$label}<br>";
        echo "<pre>";
        var_dump($arr);
        echo "</pre>";
        echo "<br>";
    }
    // === Section 1
    show($_GET, "GET");
    show($_POST, "POST");
    show($_COOKIE, "COOKIE");
    show($_SERVER, "SERVER");
    show(getallheaders(), "Request headers");
    show(apache_response_headers(), "Response headers: apache_response_headers (array)");
    // Section 1 ===
    if (isset($_COOKIE["thetestcookie"])) {
        echo "thetestcookie:" . $_COOKIE["thetestcookie"] . "<br>";
    } else {
        echo "thetestcookie: cookie is not set<br>";
    }
    echo "<br><br>Usage notes:<br>";
    $readme = "";
    $readme .= "- You can set a cookie called 'thetestcookie'";
    echo $readme;
    echo "<br>DONE<br>";
}
开发者ID:digitalowlnyc,项目名称:php-utils,代码行数:34,代码来源:http.php

示例3: show

function show($node)
{
    if ($node->hasChildren()) {
        $children = $node->getChildren();
        // display each child
        foreach ($children as $child) {
            //$content = $child->getContent();
            //$content->load();
            //echo $content->getTitle();
            echo $child->getId();
            echo '<br>';
            show($child);
            /*
            if ($level > 20)
            {
            		trigger_error('menu::displayChildren() level higher than 20, infinite loop ?');
            }
            else
            {
            	
            }
            */
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:25,代码来源:nodelist.test.php

示例4: getbean

 public function getbean()
 {
     $uid = I('uid');
     $beancount = M('beancount');
     $data = array();
     if (!$uid) {
         show(101, '非法操作!', $data);
     }
     $task = I('task');
     switch ($task) {
         case "school":
         case "head":
             $num = 10;
             break;
         case "weixin":
         case "qq":
             $num = 10;
             break;
         default:
             return show(102, "非法操作!", $data);
             break;
     }
     $result = $beancount->where("uid={$uid}")->setInc('amount', $num);
     if ($result) {
         $data = $beancount->where("uid={$uid}")->find();
         show(200, '操作成功!', $data);
     } else {
         show(102, '操作失败!', $data);
     }
 }
开发者ID:283541486,项目名称:kaixinwa2.0,代码行数:30,代码来源:BeancountController.class.php

示例5: resetpwd

 function resetpwd()
 {
     global $db;
     //判断是否登陆
     !isset($_SESSION['user']) && exit('Please login!');
     //转到登陆页面
     if (!isset($_POST['update'])) {
         tpl('resetpwd');
     }
     //处理修改密码事件
     $post = htmlescape($_POST, 'yes');
     $rs = $db->row_query_one("SELECT * FROM user WHERE user='{$_SESSION['user']}'");
     if (!isset($rs['passwd']) || $rs['passwd'] != md5($post['passwd'])) {
         show('提示', '原密码输入错误', '-1');
         exit;
     }
     $arr = array('user' => $post['user'], 'passwd' => md5($post['newpwd']));
     $rs = $db->row_update('user', $arr, "user='{$_SESSION['user']}'");
     if ($rs) {
         $_SESSION['user'] = $post['user'];
         show('提示', '修改成功,下次登陆请使用新密码', '?module=admin&act=right');
     } else {
         show('提示', '修改密码失败,请稍后再试', '-1');
     }
     exit;
 }
开发者ID:BGCX261,项目名称:zhwphp-svn-to-git,代码行数:26,代码来源:resetpwd.act.php

示例6: sendSMS

 public function sendSMS()
 {
     $post_code = isset($_POST['post_code']) ? $_POST['post_code'] : '';
     $phone_num = isset($_POST['telephone']) ? $_POST['telephone'] : '';
     //         $post_code='U2FsdGVkX1+zY61T/9h6KxyTBWVwbNR9Z01QjZN5EmT5BzDIEROXMFb9it8VgTrW
     //         Yippi/B79Y0u+ZXJMwSLXGo8imoz9OTrB3k0uhvjIEyi4pF27xCm/Cg0pW0T3SoS
     //         9oCORpIFF/600rCAvhDsMOADCKCBtvLhpL4YpLKHQ3/jqQFsjWF8YUVMc0x9LtPa
     //         3eeGQIFsdRDr2nSWMlnGQExvNvyKnfLWUrH+YkJDIJlYzXihdv32yMw+vCf/DDa2
     //         Oq4CU2BkzLqff4IjGmA/9+FP2SS19kDMzdf5e1DO132QBhHDrLy1ffrSIabFRHVf
     //         SVDsy1qZSsC7Ea24RdmQBQ==';
     if ($phone_num == '') {
         return show(103, '手机号不能为空');
     }
     if (preg_match('/^1[34578][0-9]{9}$/', $phone_num)) {
     } else {
         return show(101, '手机号格式不正确');
     }
     $mobile_code = random(6, 1);
     //random()是公共自定义函数
     $target = "http://106.ihuyi.cn/webservice/sms.php?method=Submit";
     $post_data = "account=cf_guoqingyu&password=luping521&mobile=" . $phone_num . "&content=" . rawurlencode("您的校验码是:" . $mobile_code . "。请不要把校验码泄露给其他人。如非本人操作,可不用理会!");
     //密码可以使用明文密码或使用32位MD5加密
     $gets = xml_to_array(Post($post_data, $target));
     if ($gets['SubmitResult']['code'] == 2) {
         S('phone_num', $phone_num, 60);
         S($phone_num . 'mobile_code', $mobile_code, 60);
         return show(104, '发送成功');
     } else {
         return show(102, '发送失败');
     }
 }
开发者ID:283541486,项目名称:kaixinwa2.0,代码行数:31,代码来源:SmsController.class.php

示例7: vote

function vote($ajax = false)
{
    global $db, $balken_vote_menu, $prev;
    $qry = db("SELECT * FROM " . $db['votes'] . " WHERE menu = '1' AND forum = 0");
    $get = _fetch($qry);
    if (_rows($qry)) {
        $qryv = db("SELECT * FROM " . $db['vote_results'] . " WHERE vid = '" . $get['id'] . "' ORDER BY what");
        while ($getv = _fetch($qryv)) {
            $stimmen = sum($db['vote_results'], " WHERE vid = '" . $get['id'] . "'", "stimmen");
            if ($stimmen != 0) {
                if (ipcheck("vid_" . $get['id']) || isset($_COOKIE[$prev . "vid_" . $get['id']]) || $get['closed'] == 1) {
                    $percent = round($getv['stimmen'] / $stimmen * 100, 1);
                    $rawpercent = round($getv['stimmen'] / $stimmen * 100, 0);
                    $balken = show(_votes_balken, array("width" => $rawpercent));
                    $votebutton = "";
                    $results .= show("menu/vote_results", array("answer" => re($getv['sel']), "percent" => $percent, "stimmen" => $getv['stimmen'], "balken" => $balken));
                } else {
                    $votebutton = '<input id="contentSubmitVote" type="submit" value="' . _button_value_vote . '" class="voteSubmit" />';
                    $results .= show("menu/vote_vote", array("id" => $getv['id'], "answer" => re($getv['sel'])));
                }
            } else {
                $votebutton = '<input id="contentSubmitVote" type="submit" value="' . _button_value_vote . '" class="voteSubmit" />';
                $results .= show("menu/vote_vote", array("id" => $getv['id'], "answer" => re($getv['sel'])));
            }
        }
        $vote = show("menu/vote", array("titel" => re($get['titel']), "vid" => $get['id'], "results" => $results, "votebutton" => $votebutton, "stimmen" => $stimmen));
    }
    return empty($vote) ? '<center style="margin:2px 0">' . _vote_menu_no_vote . '</center>' : ($ajax ? $vote : '<div id="navVote">' . $vote . '</div>');
}
开发者ID:nopuls,项目名称:dzcp,代码行数:29,代码来源:vote.php

示例8: show

function show(&$smarty, $tmp, $setting, &$html, $lv = 0, &$limit)
{
    if ($setting['shownode'] && $lv != 0) {
        if (is_object($smarty) && method_exists($smarty, 'gen_url')) {
            $url = $smarty->gen_url(array('app' => 'content', 'ctl' => 'site_article', 'act' => 'lists', 'arg0' => $tmp['info']['node_id']));
        }
        $html .= html($lv, $url, $tmp['info']['node_name']);
    }
    if (!$setting['shownode']) {
        if ($limit <= 0) {
            return;
        }
        #$tmp['article'] = array_slice( $tmp['article'], 0, $setting['limit'] );
    }
    if ($tmp['article']) {
        if ($setting['styleart']) {
            $tmp_lv = $setting['shownode'] ? $setting['lv'] + 1 : 2;
        } else {
            $tmp_lv = $lv + 1;
        }
        foreach ($tmp['article'] as $row) {
            if (is_object($smarty) && method_exists($smarty, 'gen_url')) {
                $url = $smarty->gen_url(array('app' => 'content', 'ctl' => 'site_article', 'act' => 'index', 'arg0' => $row['article_id']));
            }
            $html .= html($tmp_lv, $url, $row['title']);
            $limit--;
        }
    }
    if ($tmp['child']) {
        foreach ($tmp['child'] as $row) {
            show($smarty, $row, $setting, $html, $lv + 1, $limit);
        }
    }
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:34,代码来源:widget_article.php

示例9: ftopics

function ftopics()
{
    global $db, $maxftopics, $lftopics, $maxfposts, $allowHover;
    $f = 0;
    $qry = db("SELECT s1.*,s2.id AS subid FROM " . $db['f_threads'] . " s1, " . $db['f_skats'] . " s2, " . $db['f_kats'] . " s3\n               WHERE s1.kid = s2.id AND s2.sid = s3.id ORDER BY s1.lp DESC LIMIT 100");
    while ($get = _fetch($qry)) {
        if ($f == $maxftopics) {
            break;
        }
        if (fintern($get['kid'])) {
            $lp = cnt($db['f_posts'], " WHERE sid = '" . $get['id'] . "'");
            $pagenr = ceil($lp / $maxfposts);
            if ($pagenr == 0) {
                $page = 1;
            } else {
                $page = $pagenr;
            }
            if ($allowHover == 1) {
                $info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['topic'])) . '</td></tr><tr><td><b>' . _forum_posts . ':</b></td><td>' . $lp . '</td></tr><tr><td><b>' . _forum_lpost . ':</b></td><td>' . date("d.m.Y H:i", $get['lp']) . _uhr . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
            }
            $ftopics .= show("menu/forum_topics", array("id" => $get['id'], "pagenr" => $page, "p" => $lp + 1, "titel" => cut(re($get['topic']), $lftopics), "info" => $info, "kid" => $get['kid']));
            $f++;
        }
    }
    return empty($ftopics) ? '' : '<table class="navContent" cellspacing="0">' . $ftopics . '</table>';
}
开发者ID:nopuls,项目名称:dzcp,代码行数:26,代码来源:ftopics.php

示例10: navi

function navi($kat)
{
    global $db, $chkMe, $userid, $designpath;
    if ($k = _fetch(db("SELECT `level` FROM " . $db['navi_kats'] . " WHERE `placeholder` = '" . up($kat) . "'"))) {
        $intern = $chkMe >= 2 ? '' : " AND s1.`internal` = '0'";
        $permissions = $kat == 'nav_admin' && admin_perms($userid) ? "" : $intern . " AND " . intval($chkMe) . " >= '" . intval($k['level']) . "'";
        $qry = db("SELECT s1.* FROM " . $db['navi'] . " AS s1 LEFT JOIN " . $db['navi_kats'] . " AS s2 ON s1.kat = s2.placeholder\n                 WHERE s1.kat = '" . up($kat) . "' AND s1.`shown` = '1' " . $permissions . "\n                 ORDER BY s1.pos");
        while ($get = _fetch($qry)) {
            if ($get['type'] == 0) {
                $link = '';
            } elseif ($get['type'] == 1 || $get['type'] == 2 || $get['type'] == 3) {
                $name = $get['wichtig'] == 1 ? '<span class="fontWichtig">' . navi_name(re($get['name'])) . '</span>' : navi_name(re($get['name']));
                $target = $get['target'] == 1 ? '_blank' : '_self';
                if (file_exists($designpath . '/menu/' . $get['kat'] . '.html')) {
                    $link = show("menu/" . $get['kat'] . "", array("target" => $target, "href" => re($get['url']), "title" => strip_tags($name), "css" => ucfirst(str_replace('nav_', '', re($get['kat']))), "link" => $name));
                } else {
                    $link = show("menu/nav_link", array("target" => $target, "href" => re($get['url']), "title" => strip_tags($name), "css" => ucfirst(str_replace('nav_', '', re($get['kat']))), "link" => $name));
                }
                $table = strstr($link, '<tr>') ? true : false;
            }
            $navi .= $link;
        }
    }
    return empty($navi) ? '' : ($table ? '<table class="navContent" cellspacing="0">' . $navi . '</table>' : $navi);
}
开发者ID:nopuls,项目名称:dzcp,代码行数:25,代码来源:navi.php

示例11: fvote

function fvote($id, $ajax = false)
{
    global $db, $balken_vote_menu, $prev;
    if (!permission("votes")) {
        $intern = ' AND intern = 0';
    }
    $qry = db("SELECT * FROM " . $db['votes'] . "  WHERE id = '" . $id . "' " . $intern . "");
    $get = _fetch($qry);
    if (_rows($qry)) {
        $qryv = db("SELECT * FROM " . $db['vote_results'] . " WHERE vid = '" . $get['id'] . "' ORDER BY id ASC");
        while ($getv = _fetch($qryv)) {
            $stimmen = sum($db['vote_results'], " WHERE vid = '" . $get['id'] . "'", "stimmen");
            if ($stimmen != 0) {
                if (ipcheck("vid_" . $get['id']) || isset($_COOKIE[$prev . "vid_" . $get['id']]) || $get['closed'] == 1) {
                    $percent = round($getv['stimmen'] / $stimmen * 100, 1);
                    $rawpercent = round($getv['stimmen'] / $stimmen * 100, 0);
                    $balken = show(_votes_balken, array("width" => $rawpercent));
                    $votebutton = "";
                    $results .= show("forum/vote_results", array("answer" => re($getv['sel']), "percent" => $percent, "stimmen" => $getv['stimmen'], "balken" => $balken));
                } else {
                    $votebutton = '<input id="contentSubmitFVote" type="submit" value="' . _button_value_vote . '" class="voteSubmit" />';
                    $results .= show("forum/vote_vote", array("id" => $getv['id'], "answer" => re($getv['sel'])));
                }
            } else {
                $votebutton = '<input id="contentSubmitFVote" type="submit" value="' . _button_value_vote . '" class="voteSubmit" />';
                $results .= show("forum/vote_vote", array("id" => $getv['id'], "answer" => re($getv['sel'])));
            }
        }
        $qryf = db("SELECT id,kid FROM " . $db['f_threads'] . " WHERE vote = '" . $get['id'] . "'");
        $getf = _fetch($qryf);
        $vote = show("forum/vote", array("titel" => re($get['titel']), "vid" => $get['id'], "fid" => $getf['id'], "kid" => $getf['kid'], "umfrage" => _forum_vote, "results" => $results, "votebutton" => $votebutton, "stimmen" => $stimmen));
    }
    return empty($vote) ? '' : ($ajax ? $vote : '<div id="navFVote">' . $vote . '</div>');
}
开发者ID:nopuls,项目名称:dzcp,代码行数:34,代码来源:fvote.php

示例12: check_rights

function check_rights($right_name = "")
{
    //Define global variables
    global $user;
    //Check rights
    if (isset($GLOBALS['super_rights_users'][$user->data['username']])) {
        //For users with super rights
        return true;
    } else {
        //If
        if ($right_name !== "") {
            $rightRES = db_query("SELECT * FROM `phpbb_rights` WHERE `name`='{$right_name}'");
            if (db_count($rightRES) == 1) {
                $right_id = db_fetch($rightRES)['id'];
            } else {
                show("Ошибка в функции check_right_name(). Права с именем '{$right_name}' не существует или имеется несколько прав с таким именем.<br/>");
                show('Debug backtrace:');
                show(debug_backtrace());
                exit;
            }
            if (db_easy_count("SELECT * FROM `phpbb_rights_users` WHERE `user_id`={$user->data['user_id']} AND `right_id`={$right_id}") > 0) {
                return true;
            } else {
                return false;
            }
        }
    }
}
开发者ID:jsib,项目名称:intranet,代码行数:28,代码来源:auth.php

示例13: motm

function motm()
{
    global $db, $allowHover;
    $userpics = get_files(basePath . '/inc/images/uploads/userpics/');
    $qry = db("SELECT * FROM " . $db['users'] . " WHERE level >= 2");
    while ($rs = _fetch($qry)) {
        foreach ($userpics as $userpic) {
            $tmpId = intval($userpic);
            if ($tmpId == $rs['id']) {
                $temparr[] = $rs['id'];
                $a++;
                break;
            }
        }
    }
    $arrayID = rand(0, count($temparr) - 1);
    $uid = $temparr[$arrayID];
    $get = _fetch(db("SELECT * FROM " . $db['users'] . " WHERE id = '" . $uid . "'"));
    if (!empty($get) && !empty($temparr)) {
        $status = $get['status'] == 1 || $get['level'] == 1 ? _aktiv : _inaktiv;
        if ($allowHover == 1) {
            $info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . rawautor($get['id']) . '</td></tr><tr><td width=80px><b>' . _posi . ':</b></td><td>' . getrank($get['id']) . '</td></tr><tr><td><b>' . _status . ':</b></td><td>' . $status . '</td></tr><tr><td><b>' . _age . ':</b></td><td>' . getAge($get['bday']) . '</td></tr><tr><td colspan=2 align=center>' . jsconvert(userpic($get['id'])) . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
        }
        $member = show("menu/motm", array("uid" => $get['id'], "upic" => userpic($get['id'], 130, 161), "info" => $info));
    } else {
        $member = '';
    }
    return empty($member) ? '' : '<table class="navContent" cellspacing="0">' . $member . '</table>';
}
开发者ID:nopuls,项目名称:dzcp,代码行数:29,代码来源:motm.php

示例14: showCategoryTopics

 public function showCategoryTopics($name)
 {
     $name = isset($name) ? urldecode($name['action']) : show(404);
     $topics = Topic::getTopicByCategory($name) or redirect(404);
     $singleTopic = $topics[0];
     echo $this->blade->render('category-topics', compact('topics', 'singleTopic'));
 }
开发者ID:marious,项目名称:talkingspace_forum,代码行数:7,代码来源:TopicController.php

示例15: getArticlesAdminContent

function getArticlesAdminContent()
{
    global $site;
    global $sActionText;
    $ret = '';
    //	$ret .= '<div id="artBlock">' . "\n";
    if (strlen($sActionText) != 0) {
        $ret .= '<div class="categoryAction">' . "\n";
        $ret .= $sActionText . "\n";
        $ret .= '</div>' . "\n";
    }
    $ret .= '<div>' . "\n";
    switch ($_GET['action']) {
        case 'create':
            $ret .= getArticleEditForm() . "\n";
            break;
        case 'edit':
            $ret .= getArticleEditForm(intval($_GET[ID])) . "\n";
            break;
        case 'show':
            $ret .= show(intval($_GET[ID])) . "\n";
            break;
        default:
            $ret .= letterlist() . "\n";
            break;
    }
    $ret .= '</div>' . "\n";
    //	$ret .= '</div>' . "\n";
    return $ret;
}
开发者ID:Benn,项目名称:Silurus-Classifieds-Script,代码行数:30,代码来源:subscribe.php


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