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


PHP showMsg函数代码示例

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


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

示例1: getFileContent

 public static function getFileContent($file)
 {
     if (!file_exists($file)) {
         showMsg($file . ' not exist');
     }
     return file_get_contents($file);
 }
开发者ID:quan2010,项目名称:DataDictionaryGenerator,代码行数:7,代码来源:File.php

示例2: __construct

 function __construct($modtype)
 {
     $this->name = $modtype;
     $this->db = $GLOBALS['dsql'];
     $query = "SELECT * FROM #@__member_model WHERE name='{$modtype}'";
     $diyinfo = $this->db->getone($query);
     if (!is_array($diyinfo)) {
         showMsg('参数不正确,该会员模型不存在', 'javascript:;');
         exit;
     }
     $etypes = array();
     $egroups = array();
     $this->db->Execute('me', 'SELECT * FROM `#@__stepselect` ORDER BY id desc');
     while ($arr = $this->db->GetArray()) {
         $etypes[] = $arr;
         $egroups[$arr['egroup']] = $arr['itemname'];
     }
     $this->egroups = $egroups;
     $this->modid = $diyinfo['id'];
     $this->table = $diyinfo['table'];
     $this->description = $diyinfo['description'];
     $this->state = $diyinfo['state'];
     $this->issystem = $diyinfo['issystem'];
     $this->info = $diyinfo['info'];
 }
开发者ID:ahmatjan,项目名称:cmf2,代码行数:25,代码来源:membermodel.cls.php

示例3: checkLogined

function checkLogined($return = false)
{
    $boolean = isset($_SESSION['uid']) && $_SESSION['uid'];
    if ($return) {
        return $boolean;
    } else {
        if (!$boolean) {
            showMsg('请登录系统', url('member', 'login'));
            exit;
        }
    }
}
开发者ID:biaoche77,项目名称:chat,代码行数:12,代码来源:function.php

示例4: __construct

 /**
  *  析构函数
  *
  * @access    public
  * @param     string  $diyid  自定义表单ID
  * @return    string
  */
 function __construct($diyid)
 {
     $this->diyid = $diyid;
     $this->db = $GLOBALS['dsql'];
     $query = "SELECT * FROM #@__diyforms WHERE diyid='{$diyid}'";
     $diyinfo = $this->db->GetOne($query);
     if (!is_array($diyinfo)) {
         showMsg('参数不正确,该自定义表单不存在', 'javascript:;');
         exit;
     }
     $this->info = $diyinfo['info'];
     $this->name = $diyinfo['name'];
     $this->table = $diyinfo['table'];
     $this->public = $diyinfo['public'];
     $this->listTemplate = $diyinfo['listtemplate'] != '' && file_exists(DEDETEMPLATE . '/plus/' . $diyinfo['listtemplate']) ? $diyinfo['listtemplate'] : 'list_diyform.htm';
     $this->viewTemplate = $diyinfo['viewtemplate'] != '' && file_exists(DEDETEMPLATE . '/plus/' . $diyinfo['viewtemplate']) ? $diyinfo['viewtemplate'] : 'view_diyform.htm';
     $this->postTemplate = $diyinfo['posttemplate'] != '' && file_exists(DEDETEMPLATE . '/plus/' . $diyinfo['posttemplate']) ? $diyinfo['posttemplate'] : 'post_diyform.htm';
 }
开发者ID:stonelf,项目名称:mcgmh,代码行数:25,代码来源:diyform.cls.php

示例5: __construct

 function __construct($diyid)
 {
     $this->diyid = $diyid;
     $this->db = $GLOBALS['dsql'];
     $query = "select * from #@__diyforms where diyid='{$diyid}'";
     $diyinfo = $this->db->getone($query);
     if (!is_array($diyinfo)) {
         showMsg('参数不正确,该自定义表单不存在', 'javascript:;');
         exit;
     }
     $this->info = $diyinfo['info'];
     $this->name = $diyinfo['name'];
     $this->table = $diyinfo['table'];
     $this->public = $diyinfo['public'];
     $this->listTemplate = $diyinfo['listtemplate'] != '' && file_exists(DEDEINC . '/../templets/plus/' . $diyinfo['listtemplate']) ? $diyinfo['listtemplate'] : 'list_diyform.htm';
     $this->viewTemplate = $diyinfo['viewtemplate'] != '' && file_exists(DEDEINC . '/../templets/plus/' . $diyinfo['viewtemplate']) ? $diyinfo['viewtemplate'] : 'view_diyform.htm';
     $this->postTemplate = $diyinfo['posttemplate'] != '' && file_exists(DEDEINC . '/../templets/plus/' . $diyinfo['posttemplate']) ? $diyinfo['posttemplate'] : 'post_diyform.htm';
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:18,代码来源:diyform.cls.php

示例6: __construct

 public function __construct($db, $bakDir, $dbConfig)
 {
     $this->bakDir = $bakDir;
     $this->db = $db;
     $this->dbConfig = $dbConfig;
     $dbName = $dbConfig['database'];
     $sqlFiles = glob($bakDir . $dbName . "_*.sql");
     if (count($sqlFiles) < 1) {
         showMsg('bak files unexist');
     }
     foreach ($sqlFiles as $k => $v) {
         list($d, $t, $thetime, $id) = explode("_", substr(basename($v), 0, -4));
         $arrfile[$k] = $thetime;
     }
     asort($arrfile);
     $all_count = array_count_values($arrfile);
     $maxtime = array_pop($arrfile);
     $this->sqlFilesNum = $all_count[$maxtime];
     $this->sqlFilePrefix = $bakdir . $dbName . "_" . date('Ymd', $maxtime) . "_" . $maxtime;
 }
开发者ID:quan2010,项目名称:DataDictionaryGenerator,代码行数:20,代码来源:Recover.php

示例7: checkLogined

<?php 
checkLogined();
if (isset($_POST['submit'])) {
    if ($_POST['text'] == "") {
        echo "请输入内容";
    } else {
        $sql = mysql_connect("localhost", "root", "") or die("连接失败1");
        mysql_select_db("php_msg") or die("连接失败2");
        mysql_query("SET NAMES 'utf8'");
        $newsid = $_POST['newsid'];
        $content = $_POST['text'];
        $date = date("y-m-d H:i");
        $sql = "INSERT INTO `php_msg`.`com` ( `newsid`, `content`,`dates`)\n        VALUES ( '{$newsid}', '{$content}', '{$date}')";
        mysql_query($sql);
        echo "<script>alert('评论成功');window.location.href='index.php?mod=article&do=view&aid=" . $newsid . "'</script>";
    }
}
showMsg('发布成功', url('article'), 'success');
开发者ID:biaoche77,项目名称:chat,代码行数:18,代码来源:article_comments.php

示例8: echoPageCache

 $tpl->P['cp'] = 'voddown';
 $tpl->P['cn'] = $tpl->P['id'] . '-' . $tpl->P['src'] . '-' . $tpl->P['num'];
 echoPageCache($tpl->P['cp'], $tpl->P['cn']);
 $db = new AppDb($MAC['db']['server'], $MAC['db']['user'], $MAC['db']['pass'], $MAC['db']['name']);
 $sql = "SELECT * FROM {pre}vod WHERE d_hide=0 AND d_id=" . $tpl->P['id'];
 $row = $db->getRow($sql);
 if (!$row) {
     showMsg("获取数据失败,请勿非法传递参数", MAC_PATH);
 }
 if (!getUserPopedom($row["d_type"], "down")) {
     showMsg("您没有权限浏览播放页", MAC_PATH . "index.php?m=user-index.html");
 }
 if ($MAC['user']['status'] == 1) {
     $uid = intval($_SESSION['userid']);
     if ($row["d_stint"] > 0 && $uid == 0) {
         showMsg("此为收费数据请先登录再观看", MAC_PATH . "index.php?m=user-index.html");
     }
     $rowu = $db->getRow("SELECT * FROM {pre}user where u_id=" . $uid);
     if ($rowu) {
         $stat = false;
         $upoint = $rowu["u_points"];
         $downf = "," . $tpl->P['id'] . "-" . $tpl->P['src'] . "-" . $tpl->P['num'] . ",";
         if ($rowu["u_flag"] == 1) {
             if (time() >= $rowu["u_end"]) {
                 $msg = "对不起,您的会员时间已经到期,请联系管理员续费!";
             }
         } elseif ($rowu["u_flag"] == 2) {
             if ($rowu["u_start"] >= $rowu["u_ip"] && $rowu["u_ip"] <= $rowu["u_end"]) {
                 $stat = true;
             }
             if (!$stat) {
开发者ID:klarclm,项目名称:sgv,代码行数:31,代码来源:vod.php

示例9: intval

 S::gp(array('schctl', 'config', 'hotwordsconfig', 'view', 'new_view'));
 $schctl['schstart'] > 23 && ($schctl['schstart'] = 0);
 $schctl['schend'] > 23 && ($schctl['schend'] = 0);
 $config['opensch'] = $schctl['opensch'] . "\t" . $schctl['schstart'] . "\t" . $schctl['schend'];
 $config['maxresult'] = intval($config['maxresult']);
 $config['schwait'] = intval($config['schwait']);
 //		$config['hotwords'] = trim($config['hotwords']);
 $config['filterids'] = trim($config['filterids']);
 $config['operate_log'] = (array) $config['operate_log'];
 $config['search_type_expand'] = (array) $config['search_type_expand'];
 $config['openbuildattachs'] = $config['openbuildattachs'];
 if ($config['operate_log'] && array_diff($config['operate_log'], array('log_forums', 'log_threads', 'log_posts', 'log_diarys', 'log_members', 'log_colonys'))) {
     showMsg("抱歉,操作行为记录类型不存在");
 }
 if ($config['search_type_expand'] && array_diff($config['search_type_expand'], array('cms', 'diary', 'group'))) {
     showMsg("抱歉,搜索类型扩展不存在");
 }
 if ($config['filterids']) {
     $filterids = explode(",", $config['filterids']);
     foreach ($filterids as $id) {
         $id = intval($id);
         if ($id < 1) {
             adminmsg('搜索过滤版块ID不能为字符');
         }
     }
     $config['filterids'] = implode(',', $filterids);
 }
 $temp = $tempHotwords = array();
 $query = $db->query(" SELECT * FROM pw_searchhotwords ORDER BY vieworder ASC");
 while ($rt = $db->fetch_array($query)) {
     $temp['keyword'] = $rt['keyword'];
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:searcher.php

示例10: numofpage

     $pages = numofpage($sum, $page, $numofpage, "forumcp.php?action=edit&type=reward&fid={$fid}&{$url_a}");
     $threaddb = array();
     $query = $db->query("SELECT t.tid,t.fid,t.subject,t.author,t.authorid,t.postdate,r.cbtype,r.cbval,r.catype,r.caval FROM pw_threads t LEFT JOIN pw_reward r USING(tid) WHERE t.fid=" . S::sqlEscape($fid) . " AND t.special='3' AND t.state='0' AND r.timelimit>" . S::sqlEscape($timestamp) . $sql . " ORDER BY t.postdate {$limit}");
     while ($rt = $db->fetch_array($query)) {
         $rt['postdate'] = get_date($rt['postdate'], 'Y-m-d');
         $rt['cbtype'] = is_numeric($rt['cbtype']) ? $_CREDITDB[$rt['cbtype']][0] : ${'db_' . $rt['cbtype'] . 'name'};
         $rt['catype'] = is_numeric($rt['catype']) ? $_CREDITDB[$rt['catype']][0] : ${'db_' . $rt['catype'] . 'name'};
         $rt['binfo'] = $rt['cbval'] . "&nbsp;" . $rt['cbtype'];
         $rt['ainfo'] = $rt['caval'] . "&nbsp;" . $rt['catype'];
         $threaddb[] = $rt;
     }
     require_once PrintEot('forumcp');
     footer();
 } elseif ($type == 'thread') {
     if (!$isGM && $forumcp_type['allowtpctype'] == 0) {
         showMsg('您没有管理权限!');
     }
     S::gp(array('starttime', 'endtime', 'username', 't_type'));
     S::gp(array('page'), 'GP', 2);
     $page < 1 && ($page = 1);
     $limit = "LIMIT " . ($page - 1) * $db_perpage . ",{$db_perpage}";
     $sql = $url_a = '';
     $_POST['starttime'] && ($starttime = PwStrtoTime($starttime));
     $_POST['endtime'] && ($endtime = PwStrtoTime($endtime));
     if ($username) {
         $sql .= ' AND author=' . S::sqlEscape($username);
         $url_a .= "username=" . rawurlencode($username) . "&";
     }
     if ($starttime) {
         $sql .= ' AND postdate>' . S::sqlEscape($starttime);
         $url_a .= "starttime={$starttime}&";
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:forumcp.php

示例11: showInfo

function showInfo($msg = '', $url = 'back', $isexit = false)
{
    return showMsg($msg, $url, '', false, '提示信息', $isexit, 2);
}
开发者ID:sdgdsffdsfff,项目名称:51jhome_customerservice,代码行数:4,代码来源:base.min.v2.php

示例12: be

             return;
         }
     }
     $upcache = true;
     break;
 case "art_topic":
     $col = "t_id";
     $ids = be("get", "t_id");
     if (isN($ids)) {
         $ids = be("arr", "t_id");
     }
     $arr = explode(',', $ids);
     foreach ($arr as $a) {
         $cc = $db->getOne('select count(*) from {pre}art_relation where r_type=2 and r_a=' . $a);
         if ($cc > 0) {
             showMsg('请先删除本专题下面的视频', '');
             return;
         }
     }
     $upcache = true;
     break;
 case "gbook":
     $col = "g_id";
     $ids = be("get", "g_id");
     if (isN($ids)) {
         $ids = be("arr", "g_id");
     }
     break;
 case "manager":
     $col = "m_id";
     $ids = be("get", "m_id");
开发者ID:klarclm,项目名称:sgv,代码行数:31,代码来源:admin_data.php

示例13: ShowMsg

 if ($validate == '' || $validate != $svali) {
     ShowMsg("验证码不正确!", "");
     exit;
 }
 $ip = GetIP();
 $dtime = time();
 $uname = trimMsg($uname);
 $email = trimMsg($email);
 $homepage = trimMsg($homepage);
 $homepage = preg_replace("#http:\\/\\/#", '', $homepage);
 $qq = trimMsg($qq);
 $msg = trimMsg(cn_substrR($msg, 1024), 1);
 $tid = empty($tid) ? 0 : intval($tid);
 $reid = empty($reid) ? 0 : intval($reid);
 if ($msg == '' || $uname == '') {
     showMsg('你的姓名和留言内容不能为空!', '-1');
     exit;
 }
 $title = HtmlReplace(cn_substrR($title, 60), 1);
 if ($title == '') {
     $title = '无标题';
 }
 if ($reid != 0) {
     $row = $dsql->GetOne("SELECT msg FROM `#@__guestbook` WHERE id='{$reid}' ");
     $msg = "<div class=\\'rebox\\'>" . addslashes($row['msg']) . "</div>\n" . $msg;
 }
 $query = "INSERT INTO `#@__guestbook`(title,tid,mid,uname,email,homepage,qq,face,msg,ip,dtime,ischeck)\r\n                  VALUES ('{$title}','{$tid}','{$g_mid}','{$uname}','{$email}','{$homepage}','{$qq}','{$img}','{$msg}','{$ip}','{$dtime}','{$needCheck}'); ";
 $dsql->ExecuteNoneQuery($query);
 $gid = $dsql->GetLastID();
 if ($needCheck == 1) {
     require_once DEDEINC . "/oxwindow.class.php";
开发者ID:JaniseSheng,项目名称:wwwroot,代码行数:31,代码来源:guestbook.php

示例14: array

    $valarr = array($tpl->P["des"], $tpl->P["key"], $tpl->P["pg"], $tpl->P["order"], $tpl->P["by"], $tpl->P["wd"], urlencode($tpl->P["wd"]), $tpl->P["pinyin"], $tpl->P["letter"], $tpl->P['typeid'], $tpl->P['typepid']);
    $tpl->H = str_replace($colarr, $valarr, $tpl->H);
    unset($colarr, $valarr);
    $linktype = $tpl->getLink('art', 'search', '', array('typeid' => $tpl->P['typepid']));
    $linkletter = $tpl->getLink('art', 'search', '', array('letter' => ''));
    $linkorderasc = $tpl->getLink('art', 'search', '', array('order' => 'asc'));
    $linkorderdesc = $tpl->getLink('art', 'search', '', array('order' => 'desc'));
    $linkbytime = $tpl->getLink('art', 'search', '', array('by' => 'time'));
    $linkbyhits = $tpl->getLink('art', 'search', '', array('by' => 'hits'));
    $linkbyscore = $tpl->getLink('art', 'search', '', array('by' => 'score'));
    $tpl->H = str_replace(array('{page:linkletter}', '{page:linktype}', '{page:linkorderasc}', '{page:linkorderdesc}', '{page:linkbytime}', '{page:linkbyhits}', '{page:linkbyscore}'), array($linkletter, $linktype, $linkorderasc, $linkorderdesc, $linkbytime, $linkbyhits, $linkbyscore), $tpl->H);
    $_SESSION["last_artsearchtime"] = time();
} elseif ($method == 'detail') {
    $tpl->C["siteaid"] = 26;
    $tpl->P['cp'] = 'art';
    $tpl->P['cn'] = $tpl->P['id'] . '-' . $tpl->P['pg'];
    echoPageCache($tpl->P['cp'], $tpl->P['cn']);
    $db = new AppDb($MAC['db']['server'], $MAC['db']['user'], $MAC['db']['pass'], $MAC['db']['name']);
    $sql = "SELECT * FROM {pre}art WHERE a_hide=0 AND a_id=" . $tpl->P['id'];
    $row = $db->getRow($sql);
    if (!$row) {
        showMsg("获取数据失败,请勿非法传递参数", "../");
    }
    $tpl->T = $MAC_CACHE['arttype'][$row['a_type']];
    $tpl->D = $row;
    unset($row);
    $tpl->loadart();
    $tpl->replaceArt();
} else {
    showErr('System', '未找到指定系统模块');
}
开发者ID:klarclm,项目名称:sgv,代码行数:31,代码来源:art.php

示例15: reduction

function reduction()
{
    global $db;
    $fname = be("get", "file");
    $handle = opendir('bak');
    while ($file = readdir($handle)) {
        if (strpos("," . $file, $fname) > 0) {
            $fpath = "bak/" . $file;
            $sqls = file($fpath);
            foreach ($sqls as $sql) {
                $sql = str_replace("\r", "", $sql);
                $sql = str_replace("\n", "", $sql);
                $sql = str_replace(chr(13), "", $sql);
                if (!isN($sql)) {
                    //echo ",".$sql.",";exit;
                    $db->query(trim($sql));
                }
            }
            unset($sqls);
        }
    }
    closedir($handle);
    unset($handle);
    showMsg("成功还原数据库", getReferer());
}
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:25,代码来源:admin_db.php


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