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


PHP show_msg函数代码示例

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


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

示例1: action_comments_remove

 function action_comments_remove()
 {
     $comm = new table("comments");
     $id = intval($_GET["id"]);
     $comm->delete($id);
     show_msg("删除成功", $_SERVER["HTTP_REFERER"]);
 }
开发者ID:xurenlu,项目名称:tik,代码行数:7,代码来源:m.php

示例2: cfg_write

function cfg_write($data)
{
    if (!is_writeable(CONF)) {
        show_msg(0, 'Conf目录不可写');
    }
    $fp = fopen(CONF . '/appcfg.php', 'wb');
    flock($fp, 3);
    fwrite($fp, "<" . "?php\r\n");
    fwrite($fp, "return array(\r\n");
    foreach ($data as $fval) {
        $fval['vals'] = htmlspecialchars_decode($fval['vals']);
        if ($fval['types'] == 'int' || $fval['types'] == 'bool') {
            if ($fval['vals'] == "") {
                $fval['vals'] = 0;
            }
            fwrite($fp, "\t'" . $fval['keyword'] . "' => " . addslashes($fval['vals']) . ",\r\n");
        } elseif ($fval['types'] == 'select' || $fval['types'] == 'more') {
            list($key, $val) = explode('>>', $fval['vals']);
            if ($key == 'none') {
                fwrite($fp, "\t'" . $fval['keyword'] . "' => '',\r\n");
            } else {
                fwrite($fp, "\t'" . $fval['keyword'] . "' => '" . addslashes($key) . "',\r\n");
            }
        } else {
            fwrite($fp, "\t'" . $fval['keyword'] . "' => '" . addslashes($fval['vals']) . "',\r\n");
        }
    }
    fwrite($fp, ");");
    fclose($fp);
}
开发者ID:huangchuping,项目名称:bug,代码行数:30,代码来源:cfg_write.inc.php

示例3: save_website_template

 function save_website_template($siteid, $template)
 {
     $db = Database::obtain();
     $website['website_template'] = $template;
     $db->update(TABLE_WEBSITES, $website, "id='" . $siteid . "'");
     show_msg(translate('Selected template saved successfully.', sz_config('language')));
 }
开发者ID:hscale,项目名称:SiteZilla,代码行数:7,代码来源:template.php

示例4: delete_user

 function delete_user()
 {
     $db = Database::obtain();
     $sql = "DELETE FROM `" . TABLE_USERS . "` WHERE `id`={$this->id}";
     $db->query($sql);
     unset($this->user);
     show_msg(translate('User deleted.', $this->language));
 }
开发者ID:hscale,项目名称:SiteZilla,代码行数:8,代码来源:user.php

示例5: COUNT

    $num = $db->result("SELECT COUNT(*) AS num FROM " . DB_TABLEPRE . "sms_send WHERE 1 {$wheresql} ");
    $sql = "SELECT * FROM " . DB_TABLEPRE . "sms_send WHERE 1 {$wheresql} ORDER BY id desc LIMIT {$offset}, {$pagesize}";
    $result = $db->fetch_all($sql);
    include_once 'template/index.php';
} elseif ($do == 'update') {
    get_key("office_info_delete");
    $idarr = getGP('id', 'P', 'array');
    foreach ($idarr as $id) {
        $db->query("DELETE FROM " . DB_TABLEPRE . "sms_send WHERE id = '{$id}' ");
        //db->query("DELETE FROM ".DB_TABLEPRE."user_view WHERE uid = '$id'");
        if ($id != '') {
            $oalog = array('uid' => $_USER->id, 'content' => '删除内部短信', 'title' => '删除内部短信', 'startdate' => get_date('Y-m-d H:i:s', PHP_TIME), 'contentid' => $id, 'type' => '4');
            insert_db('oalog', $oalog);
        }
    }
    show_msg('短消息删除成功!', 'admin.php?ac=index&fileurl=sms&userkeytype=' . getGP('userkeytype', 'P') . '');
} elseif ($do == 'excel') {
    $datename = "sms_" . get_date('YmdHis', PHP_TIME);
    $outputFileName = 'data/excel/' . $datename . '.xls';
    $content = array();
    $archive = array("接收人", "发送人", "发送时间", "内容");
    $content[] = $archive;
    $wheresql = '';
    $vuidtype = getGP('vuidtype', 'P');
    if (!is_superadmin() && $vuidtype == '') {
        $wheresql .= " AND uid ='" . $_USER->id . "'";
    }
    if ($vuidtype != '') {
        if ($vuidtype == '-1') {
            $wheresql .= get_subordinate($_USER->id, 'uid');
        } else {
开发者ID:haogm123,项目名称:ydoa,代码行数:31,代码来源:mod_index.php

示例6: AND

        $wheresql .= " AND (logindate>'" . $vstartdate . "' and logindate<'" . $venddate . "')";
        $url .= '&vstartdate=' . $vstartdate . '&venddate=' . $venddate;
    }
    $num = $db->result("SELECT COUNT(*) AS num FROM " . DB_TABLEPRE . "loginlog WHERE 1 {$wheresql} and uid='" . $_USER->id . "'");
    $sql = "SELECT * FROM " . DB_TABLEPRE . "loginlog WHERE 1 {$wheresql} and uid='" . $_USER->id . "' ORDER BY id desc LIMIT {$offset}, {$pagesize}";
    $result = $db->fetch_all($sql);
    include_once 'template/log.php';
} elseif ($do == 'update') {
    show_msg('你没有权限使用此功能,请联系系统管理员作删除操作!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '');
} elseif ($do == 'userupdate') {
    get_key("config_log_delete");
    $idarr = getGP('id', 'P', 'array');
    foreach ($idarr as $id) {
        $db->query("DELETE FROM " . DB_TABLEPRE . "oalog WHERE id = '{$id}' ");
    }
    show_msg('你没有权限使用此功能,请联系系统管理员作删除操作!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&do=loglist');
} elseif ($do == 'excel') {
    $datename = "log_" . get_date('YmdHis', PHP_TIME);
    $outputFileName = 'data/excel/' . $datename . '.xls';
    //生成数据
    $content = array();
    $archive = array("姓名", "IP", "登录时间", "退出时间");
    $content[] = $archive;
    $wheresql = '';
    //根据条件导出
    if ($name = getGP('name', 'P')) {
        $wheresql .= " AND name LIKE '%{$name}%'";
    }
    //时间
    $vstartdate = getGP('vstartdate', 'P');
    $venddate = getGP('venddate', 'P');
开发者ID:haogm123,项目名称:ydoa,代码行数:31,代码来源:mod_log.php

示例7: updatecensorcache

    updatecensorcache();
    $msg = <<<EOF
\t<form method="post" action="{$theurl}">
\t<table>
\t<tr><td colspan="2">程序数据安装完成!<br><br>
\t最后,请输入您在用户中心UCenter的用户名和密码<br>系统将自动把将您设为站点管理员!
\t</td></tr>
\t<tr><td>您的用户名</td><td><input type="text" name="username" value="" size="30"></td></tr>
\t<tr><td>您的密码</td><td><input type="password" name="password" value="" size="30"></td></tr>
\t<tr><td></td><td><input type="submit" name="opensubmit" value="设置管理员"></td></tr>
\t</table>
\t<input type="hidden" name="formhash" value="{$formhash}">
\t</form>
    <iframe id="phpframe" name="phpframe" width="0" height="0" marginwidth="0" frameborder="0" src="..\\"></iframe>
EOF;
    show_msg($msg, 999);
}
//页面头部
function show_header()
{
    global $_SGLOBAL, $nowarr, $step, $theurl, $_SC;
    $nowarr[$step] = ' class="current"';
    print <<<END
\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
\t<html xmlns="http://www.w3.org/1999/xhtml">
\t<head>
\t<meta http-equiv="Content-Type" content="text/html; charset={$_SC['charset']}" />
\t<title> SupeSite 程序安装 </title>
\t<style type="text/css">
\t* {font-size:12px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 1.5em; word-break: break-all; }
\tbody { text-align:center; margin: 0; padding: 0; background: #F5FBFF; }
开发者ID:cwcw,项目名称:cms,代码行数:31,代码来源:index.php

示例8: _init_db

 private function _init_db()
 {
     $this->dbconfig['host'] = $this->config['db']['1']['dbhost'];
     $this->dbconfig['user'] = $this->config['db']['1']['dbuser'];
     $this->dbconfig['pw'] = $this->config['db']['1']['dbpw'];
     $this->dbconfig['name'] = $this->config['db']['1']['dbname'];
     $this->dbconfig['charset'] = $this->config['db']['1']['dbcharset'];
     $this->dbconfig['tablepre'] = $this->config['db']['1']['tablepre'];
     $this->ucdbconfig['host'] = UC_DBHOST;
     $this->ucdbconfig['user'] = UC_DBUSER;
     $this->ucdbconfig['pw'] = UC_DBPW;
     $this->ucdbconfig['name'] = UC_DBNAME;
     $this->ucdbconfig['charset'] = UC_DBCHARSET;
     $this->ucdbconfig['tablepre'] = UC_DBTABLEPRE;
     $this->connect_db();
     $sql = "SHOW FULL PROCESSLIST";
     $query = mysql_query($sql, $this->db);
     $waiting = false;
     $waiting_msg = '';
     while ($l = mysql_fetch_array($query, MYSQL_ASSOC)) {
         if ($l['State'] == 'Checking table') {
             $this->close_db();
             $waiting = true;
             $waiting_msg = '正在检查表,请稍后...';
         } elseif ($l['State'] == 'Repair by sorting') {
             $this->close_db();
             $waiting = true;
             $waiting_msg = '正在修复表,请稍后...';
         }
     }
     if ($waiting) {
         show_msg($waiting_msg, 'tools.php?action=repairdb', 3000);
     }
 }
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:34,代码来源:tools.php

示例9: check_db

/**
 * database check
 */
function check_db($db_host, $db_user, $db_pwd, $db_name, $db_prefix, $db_port)
{
    if (!function_exists('mysql_connect')) {
        show_msg('undefined function : mysql_connect()');
    }
    if (!@mysql_connect($db_host . ":" . $db_port, $db_user, $db_pwd)) {
        show_msg('database connect failed');
    } else {
        if ($query = mysql_query("SHOW TABLES FROM {$db_name}")) {
            while ($row = mysql_fetch_row($query)) {
                if (preg_match("/^{$db_prefix}/", $row[0])) {
                    return false;
                }
            }
        }
    }
    return true;
}
开发者ID:noikiy,项目名称:shopnc-2,代码行数:21,代码来源:function.php

示例10: array

require $config['BASE_DIR'] . '/include/compat/json.php';
$data = array('status' => 1, 'msg' => '');
if (isset($_POST['user_id'])) {
    if (isset($_SESSION['uid'])) {
        $uid = intval($_SESSION['uid']);
        $filter = new VFilter();
        $user_id = $filter->get('user_id', 'INTEGER');
        if ($uid == $user_id) {
            $data['msg'] = show_err('Invalid request!?');
        } else {
            $sql = "SELECT UID FROM video_subscribe WHERE UID = " . $uid . " AND SUID = " . $user_id . " LIMIT 1";
            $conn->execute($sql);
            if ($conn->Affected_Rows() != 1) {
                $data['msg'] = show_err($lang['ajax.remove_sub_exists']);
            } else {
                $data['status'] = 1;
                $data['msg'] = show_msg($lang['ajax.remove_sub_success']);
                $sql = "DELETE FROM video_subscribe WHERE UID = " . $uid . " AND SUID = " . $user_id . " LIMIT 1";
                $conn->execute($sql);
                $sql = "UPDATE signup SET popularity = popularity-1, points = points-2 WHERE UID = " . $uid . " LIMIT 1";
                $conn->execute($sql);
            }
        }
    } else {
        $data['msg'] = show_err($lang['ajax.remove_sub_login']);
    }
} else {
    $data['msg'] = show_err('Invalid request!');
}
echo json_encode($data);
die;
开发者ID:humor-zo,项目名称:chaofan,代码行数:31,代码来源:remove_subscriber.php

示例11: getGP

    $id = getGP('id', 'G', 'int');
    $workdate = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "book_type  WHERE id = '{$id}' ");
    include_once 'template/file_type_edit.php';
} elseif ($do == 'save') {
    $savetype = getGP('savetype', 'P');
    $id = getGP('id', 'P', 'int');
    $title = getGP('title', 'P');
    $father = getGP('father', 'P');
    $keyuser = getGP('keyuser', 'P');
    //$uid=$_USER->id;
    $book_type = array('title' => $title, 'father' => $father, 'keyuser' => $keyuser);
    update_db('book_type', $book_type, array('id' => $id));
    $content = serialize($book_type);
    $title = '编辑图书类别';
    get_logadd($id, $content, $title, 22, $_USER->id);
    show_msg('您要处理的信息操作成功!', 'admin.php?ac=file_type&fileurl=' . $fileurl . '');
}
function GET_FILE_PUBLIC_LIST($fatherid = 0, $selid = 0, $layer = 0)
{
    $str = "";
    global $db;
    $query = $db->query("SELECT * FROM " . DB_TABLEPRE . "book_type where father='{$fatherid}'  ORDER BY id Asc  ");
    if (count($query) > 0) {
        for ($i = 0; $i < $layer; $i++) {
            $str .= "├";
        }
        while ($row = $db->fetch_array($query)) {
            $selstr = $row['id'] == $selid ? 'selected="selected"' : '';
            $htmlstr = '<option value="' . $row['id'] . '"  ' . $selstr . '>' . $str . $row['title'] . '</option>';
            echo $htmlstr;
            GET_FILE_PUBLIC_LIST($row['id'], $selid, $layer + 1, $type);
开发者ID:haogm123,项目名称:ydoa,代码行数:31,代码来源:mod_file_type_edit.php

示例12: show_msg

    $db->query("UPDATE " . DB_TABLEPRE . "plugin set type='1' WHERE id = '" . $_POST['pid'] . "' ");
    //权限
    $db->query("DELETE FROM " . DB_TABLEPRE . "keytable WHERE id = 391");
    for ($i = 262; $i <= 266; $i++) {
        $db->query("DELETE FROM " . DB_TABLEPRE . "keytable WHERE id = " . $i . "");
    }
    //菜单
    for ($i = 129; $i <= 132; $i++) {
        $db->query("DELETE FROM " . DB_TABLEPRE . "menu WHERE menuid = " . $i . "");
    }
    $db->query("DELETE FROM " . DB_TABLEPRE . "menu WHERE menuid = 73");
    //数据库
    $db->query("DROP TABLE toa_property");
    $db->query("DROP TABLE toa_property_depreciation");
    $db->query("DROP TABLE toa_property_type");
    show_msg('固定资产组件模块卸载成功!', '../admin.php?ac=plugin&fileurl=mana');
} else {
    global $db;
    $sql = "SELECT * FROM " . DB_TABLEPRE . "plugin  WHERE id = '" . $_GET['pid'] . "'";
    $row = $db->fetch_one_array($sql);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<link rel="stylesheet" type="text/css" href="../template/default/content/css/style.css">
<title>天生创想OA办公系统组件集成安装程序</title>
</head>
<body class="bodycolor">
<table width="60%" border="0" align="center" cellpadding="3" cellspacing="0" class="small" style="margin-top:20px;margin-bottom:10px;">
  <tr>
开发者ID:haogm123,项目名称:ydoa,代码行数:31,代码来源:install.php

示例13: foreach

            foreach (getGP('newinherited', 'P', 'array') as $name) {
                $newinherited .= $name . ',';
            }
            $newname = explode(',', substr($newname, 0, -1));
            $newinherited = explode(',', substr($newinherited, 0, -1));
            if ($newname != '') {
                for ($i = 0; $i < sizeof($newname); $i++) {
                    if ($newname[$i] != '') {
                        if ($newname[$i] == '') {
                            $newname[$i] = '新文件夹名称';
                        }
                        if ($newinherited[$i] != '') {
                            $fatherid = $newinherited[$i];
                        } else {
                            $fatherid = '0';
                        }
                        $document_type = array('title' => $newname[$i], 'father' => $fatherid, 'date' => $date, 'type' => $_GET['type'], 'uid' => $_USER->id);
                        insert_db('document_type', $document_type);
                    }
                }
            }
            $str = ',新增了<font color=red>' . sizeof($newname) . '</font>条信息';
        }
        show_msg('批量文件夹信息更新成功' . $str . '!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&do=documenttype&type=' . $_GET['type'] . '');
    } elseif ($_GET['view'] == 'typeupdate') {
        $db->query("DELETE FROM " . DB_TABLEPRE . "document_type WHERE id = '" . $_GET[id] . "'  ");
        $db->query("UPDATE " . DB_TABLEPRE . "document_type set father='" . $_GET['fid'] . "' WHERE father = '" . $_GET[id] . "'  ");
        show_msg('文件夹信息删除成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&do=documenttype&type=' . $_GET['type'] . '');
    }
    include_once 'template/documenttype.php';
}
开发者ID:haogm123,项目名称:ydoa,代码行数:31,代码来源:mod_document.php

示例14: exit

(!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!');
get_key("office_communication_Increase");
empty($do) && ($do = 'list');
if ($do == 'list') {
    include_once 'template/add.php';
} elseif ($do == 'save') {
    $savetype = getGP('savetype', 'P');
    $company = getGP('company', 'P');
    $person = getGP('person', 'P');
    $tel = getGP('tel', 'P');
    $phone = getGP('phone', 'P');
    $fax = getGP('fax', 'P');
    $mail = getGP('mail', 'P');
    $zipcode = getGP('zipcode', 'P');
    $address = getGP('address', 'P');
    $position = getGP('position', 'P');
    $sex = getGP('sex', 'P');
    $msn = getGP('msn', 'P');
    $date = get_date('Y-m-d h:i:s', PHP_TIME);
    $type = getGP('type', 'P');
    $uid = $_USER->id;
    //主表信息
    $communication = array('company' => $company, 'person' => $person, 'tel' => $tel, 'phone' => $phone, 'fax' => $fax, 'mail' => $mail, 'zipcode' => $zipcode, 'address' => $address, 'position' => $position, 'sex' => $sex, 'msn' => $msn, 'type' => $type, 'date' => $date, 'uid' => $uid);
    //写入主表信息
    insert_db('communication', $communication);
    $id = $db->insert_id();
    $content = serialize($communication);
    $title = '添加通迅录';
    get_logadd($id, $content, $title, 9, $_USER->id);
    show_msg('添加通迅录成功!', 'admin.php?ac=index&fileurl=communication&type=' . $type . '');
}
开发者ID:haogm123,项目名称:ydoa,代码行数:31,代码来源:mod_add.php

示例15: check_db

function check_db($dbhost, $dbuser, $dbpw, $dbname, $tablepre, $dbport)
{
    if (!function_exists('mysql_connect')) {
        show_msg('undefine_func', 'mysql_connect', 0);
    }
    if (!@mysql_connect($dbhost . ":" . $dbport, $dbuser, $dbpw)) {
        $errno = mysql_errno();
        $error = mysql_error();
        if ($errno == 1045) {
            show_msg('database_errno_1045', $error, 0);
        } elseif ($errno == 2003) {
            show_msg('database_errno_2003', $error, 0);
        } else {
            show_msg('database_connect_error', $error, 0);
        }
    } else {
        if ($query = mysql_query("SHOW TABLES FROM {$dbname}")) {
            while ($row = mysql_fetch_row($query)) {
                if (preg_match("/^{$tablepre}/", $row[0])) {
                    return false;
                }
            }
        }
    }
    return true;
}
开发者ID:liuguogen,项目名称:weixin,代码行数:26,代码来源:index.php


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