• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP v_num函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: error

 * @copyright   2007-2010 Rejo Zenger <[email protected]>
 * @copyright   2010-2014 Poweradmin Development Team
 * @license     http://opensource.org/licenses/GPL-3.0 GPL
 */
require_once "inc/toolkit.inc.php";
include_once "inc/header.inc.php";
$record_id = "-1";
if (isset($_GET['id']) && v_num($_GET['id'])) {
    $record_id = $_GET['id'];
}
$zone_templ_id = "-1";
if (isset($_GET['zone_templ_id']) && v_num($_GET['zone_templ_id'])) {
    $zone_templ_id = $_GET['zone_templ_id'];
}
$confirm = "-1";
if (isset($_GET['confirm']) && v_num($_GET['confirm'])) {
    $confirm = $_GET['confirm'];
}
if ($record_id == "-1" || $zone_templ_id == "-1") {
    error(ERR_INV_INPUT);
} else {
    $owner = get_zone_templ_is_owner($zone_templ_id, $_SESSION['userid']);
    if ($confirm == '1' && $owner) {
        if (delete_zone_templ_record($record_id)) {
            success(SUC_RECORD_DEL);
        }
    } else {
        $templ_details = get_zone_templ_details($zone_templ_id);
        $record_info = get_zone_templ_record_from_id($record_id);
        echo "     <h2>" . _('Delete record in zone') . " \"" . $templ_details['name'] . "\"</h2>\n";
        if (!do_hook('verify_permission', 'zone_master_add') || !$owner) {
开发者ID:rephlex,项目名称:poweradmin,代码行数:31,代码来源:delete_zone_templ_record.php


示例2: array

 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
require_once "inc/toolkit.inc.php";
include_once "inc/header.inc.php";
echo "  <script type=\"text/javascript\" src=\"inc/helper.js\"></script>";
$owner = "-1";
if (isset($_POST['owner']) && v_num($_POST['owner'])) {
    $owner = $_POST['owner'];
}
$dom_type = "NATIVE";
if (isset($_POST["dom_type"]) && in_array($_POST['dom_type'], $server_types)) {
    $dom_type = $_POST["dom_type"];
}
if (isset($_POST['domain'])) {
    $temp = array();
    foreach ($_POST['domain'] as $domain) {
        if ($domain != "") {
            $temp[] = trim($domain);
        }
    }
    $domains = $temp;
} else {
开发者ID:jelastic-public-cartridges,项目名称:jelastic-powerdns-cartridge,代码行数:31,代码来源:add_zone_master.php


示例3: error

 *
 */
/**
 * Script that handles editing of zone records
 *
 * @package     Poweradmin
 * @copyright   2007-2010 Rejo Zenger <[email protected]>
 * @copyright   2010-2014 Poweradmin Development Team
 * @license     http://opensource.org/licenses/GPL-3.0 GPL
 */
require_once "inc/toolkit.inc.php";
include_once "inc/header.inc.php";
include_once "inc/RecordLog.class.php";
global $pdnssec_use;
$zone_id = "-1";
if (isset($_GET['id']) && v_num($_GET['id'])) {
    $zone_id = $_GET['id'];
}
if ($zone_id == "-1") {
    error(ERR_INV_INPUT);
    include_once "inc/footer.inc.php";
    exit;
}
if (isset($_POST['commit'])) {
    $error = false;
    $one_record_changed = false;
    if (isset($_POST['record'])) {
        foreach ($_POST['record'] as $record) {
            $old_record_info = get_record_from_id($record['rid']);
            // Check if a record changed and save the state
            $log = new RecordLog();
开发者ID:alex1702,项目名称:poweradmin,代码行数:31,代码来源:edit.php


示例4: get_user_detail_list

function get_user_detail_list($specific)
{
    global $db;
    $userid = $_SESSION['userid'];
    if (v_num($specific)) {
        $sql_add = "AND users.id = " . $db->quote($specific, 'integer');
    } else {
        if (verify_permission('user_view_others')) {
            $sql_add = "";
        } else {
            $sql_add = "AND users.id = " . $db->quote($userid, 'integer');
        }
    }
    $query = "SELECT users.id AS uid, \n\t\t\tusername, \n\t\t\tfullname, \n\t\t\temail, \n\t\t\tdescription AS descr,\n\t\t\tactive,\n\t\t\tperm_templ.id AS tpl_id,\n\t\t\tperm_templ.name AS tpl_name,\n\t\t\tperm_templ.descr AS tpl_descr\n\t\t\tFROM users, perm_templ \n\t\t\tWHERE users.perm_templ = perm_templ.id " . $sql_add . "\n\t\t\tORDER BY username";
    $response = $db->query($query);
    if (PEAR::isError($response)) {
        error($response->getMessage());
        return false;
    }
    while ($user = $response->fetchRow()) {
        $userlist[] = array("uid" => $user['uid'], "username" => $user['username'], "fullname" => $user['fullname'], "email" => $user['email'], "descr" => $user['descr'], "active" => $user['active'], "tpl_id" => $user['tpl_id'], "tpl_name" => $user['tpl_name'], "tpl_descr" => $user['tpl_descr']);
    }
    return $userlist;
}
开发者ID:kitpz2,项目名称:grupappz,代码行数:24,代码来源:users.inc.php


示例5: error

/**
 * Script that handles records editing in zone templates
 *
 * @package     Poweradmin
 * @copyright   2007-2010 Rejo Zenger <[email protected]>
 * @copyright   2010-2014 Poweradmin Development Team
 * @license     http://opensource.org/licenses/GPL-3.0 GPL
 */
require_once "inc/toolkit.inc.php";
include_once "inc/header.inc.php";
$record_id = "-1";
if (isset($_GET['id']) && v_num($_GET['id'])) {
    $record_id = $_GET['id'];
}
$zone_templ_id = "-1";
if (isset($_GET['zone_templ_id']) && v_num($_GET['zone_templ_id'])) {
    $zone_templ_id = $_GET['zone_templ_id'];
}
$owner = get_zone_templ_is_owner($zone_templ_id, $_SESSION['userid']);
if (isset($_POST["commit"])) {
    if (!do_hook('verify_permission', 'zone_master_add') || !$owner) {
        error(ERR_PERM_EDIT_RECORD);
    } else {
        $ret_val = edit_zone_templ_record($_POST);
        if ($ret_val == "1") {
            success(SUC_RECORD_UPD);
        } else {
            echo "     <div class=\"error\">" . $ret_val . "</div>\n";
        }
    }
}
开发者ID:alex1702,项目名称:poweradmin,代码行数:31,代码来源:edit_zone_templ_record.php


示例6:

    $perm_meta_edit = "none";
}
/*
 Check and make sure all post values have made it through
 if not set them.
*/
$zone_id = "-1";
if (isset($_GET['id']) && v_num($_GET['id'])) {
    $zone_id = $_GET['id'];
}
$ttl = $dns_ttl;
if (isset($_POST['ttl']) && v_num($_POST['ttl'])) {
    $ttl = $_POST['ttl'];
}
$prio = "10";
if (isset($_POST['prio']) && v_num($_POST['prio'])) {
    $prio = $_POST['prio'];
}
if (isset($_POST['name'])) {
    $name = $_POST['name'];
} else {
    $name = "";
}
if (isset($_POST['type'])) {
    $type = $_POST['type'];
} else {
    $type = "";
}
if (isset($_POST['content'])) {
    $content = $_POST['content'];
} else {
开发者ID:eraserewind,项目名称:poweradmin,代码行数:31,代码来源:add_record.php


示例7: error

 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
require_once "inc/toolkit.inc.php";
include_once "inc/header.inc.php";
$id = "-1";
if (isset($_GET['id']) || v_num($_GET['id'])) {
    $id = $_GET['id'];
}
if ($id == "-1") {
    error(ERR_INV_INPUT);
} elseif (!verify_permission('templ_perm_edit')) {
    error(ERR_PERM_EDIT_PERM_TEMPL);
} else {
    $id = $_GET['id'];
    if (isset($_POST['commit'])) {
        update_perm_templ_details($_POST);
    }
    $templ = get_permission_template_details($id);
    $perms_templ = get_permissions_by_template_id($id);
    $perms_avail = get_permissions_by_template_id();
    echo "    <h2>" . _('Edit permission template') . "</h2>\n";
开发者ID:kitpz2,项目名称:grupappz,代码行数:31,代码来源:edit_perm_templ.php


示例8: error

 if (isset($_POST['fullname'])) {
     $i_fullname = $_POST['fullname'];
 }
 if (isset($_POST['email'])) {
     $i_email = $_POST['email'];
 }
 if (isset($_POST['description'])) {
     $i_description = $_POST['description'];
 }
 if (isset($_POST['password'])) {
     $i_password = $_POST['password'];
 }
 if (isset($_POST['perm_templ']) && v_num($_POST['perm_templ'])) {
     $i_perm_templ = $_POST['perm_templ'];
 }
 if (isset($_POST['active']) && v_num($_POST['active'])) {
     $i_active = $_POST['active'];
 }
 if ($i_username == "-1" || $i_fullname == "-1" || $i_email < "1" || $i_description == "-1" || $i_password == "-1") {
     error(ERR_INV_INPUT);
 } else {
     if ($i_username != "" && $i_perm_templ > "0" && $i_fullname) {
         if (!isset($i_active)) {
             $active = 0;
         } else {
             $active = 1;
         }
         if (edit_user($edit_id, $i_username, $i_fullname, $i_email, $i_perm_templ, $i_description, $active, $i_password)) {
             success(SUC_USER_UPD);
         }
     }
开发者ID:kitpz2,项目名称:grupappz,代码行数:31,代码来源:edit_user.php


示例9: elseif

    $perm_meta_edit = "all";
} elseif (verify_permission('zone_meta_edit_own')) {
    $perm_meta_edit = "own";
} else {
    $perm_meta_edit = "none";
}
$zone_id = "-1";
if (isset($_GET['id']) && v_num($_GET['id'])) {
    $zone_id = $_GET['id'];
}
$ttl = $dns_ttl;
if (isset($_POST['ttl']) && v_num($_POST['ttl'])) {
    $ttl = $_POST['ttl'];
}
$prio = "10";
if (isset($_GET['prio']) && v_num($_GET['prio'])) {
    $prio = $_GET['prio'];
}
if (isset($_POST['name'])) {
    $name = $_POST['name'];
} else {
    $name = "";
}
if (isset($_POST['type'])) {
    $type = $_POST['type'];
} else {
    $type = "";
}
if (isset($_POST['content'])) {
    $content = $_POST['content'];
} else {
开发者ID:kitpz2,项目名称:grupappz,代码行数:31,代码来源:add_record.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP v_style函数代码示例发布时间:2022-05-23
下一篇:
PHP vText函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap