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

PHP var_check函数代码示例

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

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



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

示例1: dirname

        include dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . AC_FOLDER_CACHE . DIRECTORY_SEPARATOR . 'data_admin_options.php';
        $result = $db->execute("\n\t\t\t\tUPDATE arrowchat_status \n\t\t\t\tSET announcement='1'\n\t\t\t");
        if ($result) {
            $msg = "The chat announcement is now hidden.";
            if ($push_on == 1) {
                $arrowpush->publish(array('channel' => 'arrowchat', 'message' => array('announcement' => array("data" => "", "read" => "1"))));
            }
        } else {
            $error = "There was a database error.  Please try again.";
        }
    } else {
        $error = "There was a database error.  Please try again.";
    }
}
// Announcement Show Processor
if (var_check('announcement_show')) {
    $result = $db->execute("\n\t\t\tUPDATE arrowchat_config \n\t\t\tSET config_value = CASE \n\t\t\t\tWHEN config_name = 'announcement' THEN '" . get_var('announcement') . "'\n\t\t\tEND WHERE config_name IN ('announcement')\n\t\t");
    if ($result) {
        update_config_file();
        include dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . AC_FOLDER_CACHE . DIRECTORY_SEPARATOR . 'data_admin_options.php';
        $result = $db->execute("\n\t\t\t\tUPDATE arrowchat_status \n\t\t\t\tSET announcement='0'\n\t\t\t");
        if ($result) {
            $msg = "The chat announcement is now being shown.";
            if ($push_on == 1) {
                $arrowpush->publish(array('channel' => 'arrowchat', 'message' => array('announcement' => array("data" => $_POST['announcement'], "read" => "0"))));
            }
        } else {
            $error = "There was a database error.  Please try again.";
        }
    } else {
        $error = "There was a database error.  Please try again.";
开发者ID:juliushermosura,项目名称:globeloop,代码行数:31,代码来源:index.php


示例2: tinyint

			  "is_admin" tinyint(1) unsigned NOT NULL default \'0\',
			  "hash_id" varchar(20) NOT NULL,
			  PRIMARY KEY  ("userid"),
			  KEY "hash_id" ("hash_id"),
			  KEY "session_time" ("session_time")
			)
		');
    if ($result && $result2 && $result3) {
        update_config_file();
        $msg = "The repair has been successfully completed";
    }
}
$row = $db->fetch_row("\n\t\tSELECT email \n\t\tFROM arrowchat_admin\n\t");
$admin_email = $row->email;
// Admin Settings Submit Processor
if (var_check('admin_submit')) {
    $admin_new_password = get_var('admin_new_password');
    $admin_confirm_password = get_var('admin_confirm_password');
    $admin_email = get_var('admin_email');
    $admin_old_password = get_var('admin_old_password');
    if (!empty($admin_new_password) or !empty($admin_confirm_password)) {
        if ($admin_new_password != $admin_confirm_password) {
            $error = "Your new password and confirmation passwords do not match.";
        }
        if (!empty($admin_new_password) and empty($admin_confirm_password)) {
            $error = "You must supply a confirmation password.";
        }
        if (empty($admin_new_password) and !empty($admin_confirm_password)) {
            $error = "You must supply a new password.";
        }
    }
开发者ID:Sywooch,项目名称:forums,代码行数:31,代码来源:system.php


示例3: die

<?php

require_once "../inc/start.php";
if (var_check($_POST['id']) && var_check($_POST['caption_block_value']) && var_check($_POST['caption_block_start'])) {
    if (!var_check($_POST['id'])) {
        die($error_no_id['value']);
    }
    $id = $_POST['id'];
    $cue = array("start" => $_POST['caption_block_start'], "value" => $_POST['caption_block_value']);
    $video = new Youtube($id);
    echo $video->update_asr_cue($cue);
    return True;
}
开发者ID:Estevo-Aleixo,项目名称:nmc_20150128,代码行数:13,代码来源:save_caption_block.php


示例4: elseif

}
?>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<?php 
if ($page == "index.php") {
    ?>
<script src="assets/js/index.js"></script>
<?php 
} elseif ($page == "go.php") {
    ?>
<script src="assets/js/script.js"></script>
<?php 
}
?>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-22770104-6', 'auto');
  <?php 
if ($gaid = var_check($_GET['id'], True)) {
    echo "ga('set', 'YOUTUBE_ID', '" . $gaid . "');\n";
}
?>
  ga('send', 'pageview');
</script>
开发者ID:Estevo-Aleixo,项目名称:nmc_20150128,代码行数:30,代码来源:js.php


示例5: dirname

 $i = 1;
 // Mark user as no longer idle on load
 if ($status == "away" || $status == "busy") {
     $db->execute("\n\t\t\t\tUPDATE arrowchat_status \n\t\t\t\tSET status = 'available' \n\t\t\t\tWHERE userid = '" . $db->escape_string($userid) . "'\n\t\t\t");
     $status = "available";
 }
 // Show bar if hide bar is disabled
 if ($hide_bar_on != 1) {
     $hide_bar = 0;
 }
 // Show chat bar regardless of maintenance if user is admin
 if ($is_admin == 1 and $admin_view_maintenance == 1) {
     $chat_maintenance = 0;
 }
 // Load another language if lang GET value is set and exists
 if (var_check('lang')) {
     $lang = get_var('lang');
     if (preg_match("#^[a-z]{2,20}\$#i", $lang)) {
         if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_LANGUAGE . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR . $lang . ".php")) {
             include dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_LANGUAGE . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR . $lang . ".php";
         }
     }
 }
 // Get the language
 for ($i = 0; $i < count($language); $i++) {
     $settings .= 'lang[' . $i . '] = "' . $language[$i] . '";';
 }
 // Get the bar links
 for ($i = 0; $i < count($trayicon); $i++) {
     $settings .= "barLinks[" . $i . "] = ['" . implode("', '", $trayicon[$i]) . "'];";
 }
开发者ID:Lovinity,项目名称:EQM,代码行数:31,代码来源:external.php


示例6: get_var

        $guest_name_change = get_var('guest_name_change');
        $guest_name_duplicates = get_var('guest_name_duplicates');
        $guests_chat_with = get_var('guests_chat_with');
        $users_chat_with = get_var('users_chat_with');
        $show_full_username = get_var('show_full_username');
        $us_time = get_var('us_time');
        $hide_admins_buddylist = get_var('hide_admins_buddylist');
        update_config_file();
        include_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . AC_FOLDER_CACHE . DIRECTORY_SEPARATOR . 'data_admin_options.php';
        $msg = "Your settings were successfully saved.";
    } else {
        $error = "There was a database error.  Please try again.";
    }
}
// Chat Style Submit Processor
if (var_check('chatstyle_submit')) {
    if (!is_numeric(get_var('width_applications')) or !is_numeric(get_var('width_buddy_list')) or !is_numeric(get_var('width_chatrooms'))) {
        $error = "You input a non numerical value for one of the widths.  Please enter a number only not including the px.";
    }
    if (empty($error)) {
        if (get_var('width_applications') > 200 or get_var('width_applications') < 16) {
            $error = "Your applications width is either above 200px or under 16px.  Please correct the value.";
        }
        if (get_var('width_buddy_list') > 200 or get_var('width_buddy_list') < 16) {
            $error = "Your buddy list width is either above 200px or under 16px.  Please correct the value.";
        }
        if (get_var('width_chatrooms') > 200 or get_var('width_chatrooms') < 16) {
            $error = "Your chatrooms width is either above 200px or under 16px.  Please correct the value.";
        }
    }
    if (empty($error)) {
开发者ID:Lovinity,项目名称:EQM,代码行数:31,代码来源:general.php


示例7: get_var

    if ($result and $db->count_select() > 0) {
        $error = "You may not delete a default theme.";
    }
    if (empty($error)) {
        $db->execute("\n\t\t\t\tUPDATE arrowchat_status \n\t\t\t\tSET theme = NULL \n\t\t\t\tWHERE theme = '" . get_var('delete') . "'\n\t\t\t");
        $result = $db->execute("\n\t\t\t\tDELETE FROM arrowchat_themes \n\t\t\t\tWHERE id = '" . get_var('delete') . "'\n\t\t\t");
        update_config_file();
        if ($result) {
            $msg = "Your theme was deleted successfully.";
        } else {
            $error = "There was a database error.  Please try again.";
        }
    }
}
// Save Template Processor
if (var_check('save_template_submit')) {
    if (file_exists(get_var('template_file')) and is_writable(get_var('template_file'))) {
        $template_data = str_replace("\\r\\n", "\n", get_var('template_data'));
        $fh = @fopen(get_var('template_file'), 'w');
        fwrite($fh, stripslashes($template_data));
        fclose($fh);
        $msg = "The file was been updated successfully.";
    } else {
        $error = "The file does not exist or is not writable.";
    }
}
$smarty->assign('msg', $msg);
$smarty->assign('error', $error);
$smarty->display(dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_header.tpl");
require dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_themes.php";
$smarty->display(dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_footer.tpl");
开发者ID:Lovinity,项目名称:EQM,代码行数:31,代码来源:themes.php


示例8: die

    die($error_invalid_id['value']);
}
if (!var_check($_GET['type'])) {
    die($error_no_caption_format['value']);
}
$type = strtolower($_GET['type']);
if (!in_array($type, $caption_format)) {
    die($error_caption_format_not_exist['value']);
}
$edit = var_check($_GET['edit'], True);
$video = new Youtube($id);
$data = $video->get_asr_caption($edit);
if ($data == False) {
    die("No captions");
}
if (var_check($_GET['dl'])) {
    // Download it.
    header('Content-Transfer-Encoding: binary');
    if ($edit) {
        header(sprintf("Content-Disposition: attachment; filename=\"asr_%s_corrected.%s\"", $id, $type));
    } else {
        header(sprintf("Content-Disposition: attachment; filename=\"asr_%s.%s\"", $id, $type));
    }
}
switch ($type) {
    case "vtt":
        header("Content-Type: text/vtt");
        echo $video->convert_json_to_VTT($data);
        break;
    case "sbv":
        header("Content-Type: text/sbv");
开发者ID:Estevo-Aleixo,项目名称:nmc_20150128,代码行数:31,代码来源:get_caption.php


示例9: arrowchat_banlist

            $result = $db->execute("\n\t\t\t\t\tSELECT ban_userid \n\t\t\t\t\tFROM arrowchat_banlist \n\t\t\t\t\tWHERE ban_userid = '" . $db->escape_string($row['report_about']) . "'\n\t\t\t\t");
            if ($result and $db->count_select() > 0) {
                // Ban already exists
            } else {
                $db->execute("\n\t\t\t\t\t\tINSERT INTO arrowchat_banlist (\n\t\t\t\t\t\t\tban_userid,\n\t\t\t\t\t\t\tbanned_by,\n\t\t\t\t\t\t\tbanned_time\n\t\t\t\t\t\t) \n\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\t\t'" . $db->escape_string($row['report_about']) . "',\n\t\t\t\t\t\t\t'" . $db->escape_string($userid) . "',\n\t\t\t\t\t\t\t'" . $db->escape_string(time()) . "'\n\t\t\t\t\t\t)\n\t\t\t\t\t");
                require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . AC_FOLDER_ADMIN . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'functions' . DIRECTORY_SEPARATOR . 'functions_update.php';
                update_config_file();
            }
        }
    }
    echo "1";
    close_session();
    exit(0);
}
// ######################## START POST WARN USER ########################
if (var_check('report_warn')) {
    if ($is_mod == 1 || $is_admin == 1) {
        $result = $db->execute("\n\t\t\t\tSELECT report_about\n\t\t\t\tFROM arrowchat_reports\n\t\t\t\tWHERE id = '" . $db->escape_string($report_warn) . "'\n\t\t\t");
        if ($row = $db->fetch_array($result)) {
            $result = $db->execute("\n\t\t\t\t\tSELECT id\n\t\t\t\t\tFROM arrowchat_warnings\n\t\t\t\t\tWHERE user_id = '" . $db->escape_string($row['report_about']) . "'\n\t\t\t\t\t\tAND warning_time > (" . time() . " - 86400)\n\t\t\t\t");
            if ($result and $db->count_select() > 0 and $report_warn_confirm != 1) {
                // User has been warned in the past 24 hours, let the reporter handler know that before processing
                echo "2";
                close_session();
                exit(0);
            } else {
                $db->execute("\n\t\t\t\t\t\tUPDATE arrowchat_reports\n\t\t\t\t\t\tSET completed_by = '" . $db->escape_string($userid) . "',\n\t\t\t\t\t\t\tcompleted_time = '" . $db->escape_string(time()) . "'\n\t\t\t\t\t\tWHERE report_about = '" . $db->escape_string($row['report_about']) . "'\n\t\t\t\t\t\t\tAND completed_time = 0\n\t\t\t\t\t");
                $db->execute("\n\t\t\t\t\t\tINSERT INTO arrowchat_warnings (\n\t\t\t\t\t\t\tuser_id,\n\t\t\t\t\t\t\twarn_reason,\n\t\t\t\t\t\t\twarned_by,\n\t\t\t\t\t\t\twarning_time,\n\t\t\t\t\t\t\tuser_read\n\t\t\t\t\t\t) \n\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\t\t'" . $db->escape_string($row['report_about']) . "',\n\t\t\t\t\t\t\t'" . $db->escape_string($report_warn_reason) . "',\n\t\t\t\t\t\t\t'" . $db->escape_string($userid) . "',\n\t\t\t\t\t\t\t'" . $db->escape_string(time()) . "',\n\t\t\t\t\t\t\t'0'\n\t\t\t\t\t\t)\n\t\t\t\t\t");
                if ($push_on == 1) {
                    $arrowpush->publish(array('channel' => 'u' . $row['report_about'], 'message' => array('warning' => array("data" => $report_warn_reason, "read" => "0"))));
                }
开发者ID:Lovinity,项目名称:EQM,代码行数:31,代码来源:send_settings.php


示例10: array

<?php

$required = array("name" => "Name", "c_name" => "Contact Name (First, Middle Initial, Last)", "address1" => "Address", "city" => "City", "state" => "State", "zip" => "Zip", "p1" => "Phone", "p2" => "Phone", "p3" => "Phone", "pa1" => "Alternate Phone", "pa2" => "Alternate Phone", "pa3" => "Alternate Phone", "email" => "E-mail", "password" => "Password", "pwconfirm" => "Confirm Password", "pin" => "PIN");
foreach ($required as $field => $label) {
    if (!$_POST[$field]) {
        $err .= "{$label} is a required field <br>";
    }
}
if (!var_check2($tax, $ssn)) {
    $err .= "You must enter your Social Security Number or Federal Tax ID<br>";
}
if (!var_check($tax, $ssn)) {
    $err .= "Please only enter your Social Security Number <em>or</em> Federal Tax ID, not both<br>";
}
if (!check_email_address($email)) {
    $err .= "{$email} is not a valid email address <br>";
}
if (strlen($password) < 6) {
    $err .= "Your password must be at least 6 characters <br>";
}
if ($password != $pwconfirm) {
    $err .= "Your passwords must match <br>";
}
if (!eregi('^[0-9]+$', $pin)) {
    $err .= "Your PIN can only contain numbers <Br>";
}
if (strlen($pin) < 4) {
    $err .= "Your PIN must be 4 digits <br>";
}
if (char_check($ssn)) {
    $err .= "Your social security number can only contain numbers <Br>";
开发者ID:centaurustech,项目名称:BenFund,代码行数:31,代码来源:validate.php


示例11: var_check

<?php

require_once "inc/start.php";
$title = Config::Get("index.title");
$description = Config::Get("index.description");
$keywords = Config::Get("index.keywords");
$error_message = var_check($_GET['error'], True);
$id = var_check($_GET['youtube-id'], True);
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
    <?php 
require_once "inc/head.php";
?>

    <body>
        <div class="wrapper">
            <?php 
require_once "inc/header.php";
if ($error_message) {
    echo '<div class="row"><div class="bg-danger col-md-offset-3 col-md-6 text-center"><span class="text-danger"><big><b>' . $error_message . '</b></big></span></div></div>';
    echo '<div class="row"><div class="col-md-12"><hr class="low-margin"/></div></div>';
}
?>
            <div class="row">
                <div class="col-md-offset-3 col-md-6 text-center">
                    <form role="form">
                        <div class="form-group row">
                            <label for="youtube-id"><p class="lead">It's so easy to get started and fix the automatic craptioning on YouTube videos.</p> 
                                                    <p class="lead">Why should I bother? Well unless they're corrected they don't provide accessibility outcomes for users who rely on good quality captioning.</p></label>
                            <input type="text" class="form-control input-lg text-center" id="youtube-id" placeholder="Simply paste the YouTube URL or Video ID here" name="youtube-id" value="<?php 
开发者ID:Estevo-Aleixo,项目名称:nmc_20150128,代码行数:31,代码来源:index.php


示例12: get_var

    $result = $db->execute("\n\t\t\tUPDATE arrowchat_status\n\t\t\tSET hide_bar = '" . get_var('hide_bar') . "',\n\t\t\t\tplay_sound = '" . get_var('play_sound') . "', \n\t\t\t\twindow_open = '" . get_var('window_open') . "', \n\t\t\t\tonly_names = '" . get_var('only_names') . "', \n\t\t\t\tannouncement = '" . get_var('announcement') . "', \n\t\t\t\tis_admin = '" . get_var('is_admin') . "',\n\t\t\t\tis_mod = '" . get_var('is_mod') . "'\n\t\t\tWHERE userid = '" . get_var('user_id') . "'\n\t\t");
    if ($result) {
        $hide_bar = get_var('hide_bar');
        $play_sound = get_var('play_sound');
        $window_open = get_var('window_open');
        $only_names = get_var('only_names');
        $announcement = get_var('announcement');
        $is_admin = get_var('is_admin');
        $is_mod = get_var('is_mod');
        if (empty($is_mod)) {
            $db->execute("\n\t\t\t\t\tUPDATE arrowchat_chatroom_users\n\t\t\t\t\tSET is_mod = '0'\n\t\t\t\t\tWHERE user_id = '" . get_var('user_id') . "'\n\t\t\t\t");
        }
        $msg = "User settings successfully saved.";
    } else {
        $error = "There was an error saving the user's settings.";
    }
}
// Delete Guest Name
if (var_check('guest_name')) {
    $db->execute("\n\t\t\tUPDATE arrowchat_status\n\t\t\tSET guest_name = NULL\n\t\t\tWHERE userid = '" . get_var('id') . "'\n\t\t");
    if ($result) {
        $msg = "The user's name was deleted.";
    } else {
        $error = "There was an error deleting the user's name.";
    }
}
$smarty->assign('msg', $msg);
$smarty->assign('error', $error);
$smarty->display(dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_header.tpl");
require dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_users.php";
$smarty->display(dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_footer.tpl");
开发者ID:EduardoAugusto2015,项目名称:work2015,代码行数:31,代码来源:users.php


示例13: json_encode

<?php

require_once "../inc/start.php";
if (!var_check($_GET['id'])) {
    die(json_encode($error_no_id));
}
$id = $_GET['id'];
if (!youtube_validate_id($id)) {
    die(json_encode($error_invalid_id));
}
$video = new Youtube($id);
$info = $video->retrieve_info();
if ($info == False) {
    die(json_encode(array("error" => True, "value" => $video->info['reason'])));
}
if ($video->has_asr_caption() == False) {
    die(json_encode($error_no_asr));
}
$data = array("error" => False, "title" => $info['title']);
echo json_encode($data);
开发者ID:Estevo-Aleixo,项目名称:nmc_20150128,代码行数:20,代码来源:get_info.php


示例14: update_config_file

    if ($result) {
        $group_disable_arrowchat = $group_disable_arrowchat_new;
        $group_disable_video = $group_disable_video_new;
        $group_disable_apps = $group_disable_apps_new;
        $group_disable_rooms = $group_disable_rooms_new;
        $group_disable_uploads = $group_disable_uploads_new;
        $group_disable_sending_private = $group_disable_sending_private_new;
        $group_disable_sending_rooms = $group_disable_sending_rooms_new;
        update_config_file();
        $msg = "Your settings were successfully saved.";
    } else {
        $error = "There was a database error.  Please try again.";
    }
}
// Group Permissions Settings Submit Processor
if (var_check('group_settings_submit')) {
    $result = $db->execute("\n\t\t\tUPDATE arrowchat_config \n\t\t\tSET config_value = CASE \n\t\t\t\tWHEN config_name = 'group_enable_mode' THEN '" . $db->escape_string(get_var('group_enable_mode')) . "'\n\t\t\tEND WHERE config_name IN ('group_enable_mode')\n\t\t");
    $result = $db->execute("\n\t\t\tUPDATE arrowchat_config \n\t\t\tSET config_value = CASE \n\t\t\t\tWHEN config_name = 'group_disable_arrowchat' THEN ''\n\t\t\t\tWHEN config_name = 'group_disable_video' THEN ''\n\t\t\t\tWHEN config_name = 'group_disable_apps' THEN ''\n\t\t\t\tWHEN config_name = 'group_disable_rooms' THEN ''\n\t\t\t\tWHEN config_name = 'group_disable_uploads' THEN ''\n\t\t\t\tWHEN config_name = 'group_disable_sending_private' THEN ''\n\t\t\t\tWHEN config_name = 'group_disable_sending_rooms' THEN ''\n\t\t\tEND WHERE config_name IN ('group_disable_arrowchat', 'group_disable_video', 'group_disable_apps', 'group_disable_rooms', 'group_disable_uploads', 'group_disable_sending_private', 'group_disable_sending_rooms')\n\t\t");
    if ($result) {
        $group_enable_mode = get_var('group_enable_mode');
        update_config_file();
        $msg = "Your settings were successfully saved.";
    } else {
        $error = "There was a database error.  Please try again.";
    }
}
$smarty->assign('msg', $msg);
$smarty->assign('error', $error);
$smarty->display(dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_header.tpl");
require dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_users.php";
$smarty->display(dirname(__FILE__) . DIRECTORY_SEPARATOR . "layout/pages_footer.tpl");
开发者ID:Lovinity,项目名称:EQM,代码行数:31,代码来源:users.php


示例15: redirect

<?php

require_once "inc/start.php";
if (!var_check($_GET['id'])) {
    redirect("index.php?error=No+Video+ID");
}
$id = $_GET['id'];
if (!youtube_validate_id($id)) {
    redirect("index.php?error=Invalid+Video+ID");
}
$edit = var_check($_GET['edit']);
$video = new Youtube($id);
$info = $video->retrieve_info();
if ($info == False) {
    redirect("index.php?error=Video+Doesn%27t+Exist");
}
$title = format_string(Config::Get("go.title"), array("ID" => $id, "TITLE" => $info['title']));
$description = format_string(Config::Get("go.description"), array("ID" => $id, "TITLE" => $info['title']));
$keywords = format_string(Config::Get("go.keywords"), array("ID" => $id, "TITLE" => $info['title']));
$stream = $video->get_best_stream();
$caption_url = sprintf("ajax/get_caption.php?id=%s&type=vtt%s", $id, $edit ? "&edit=True" : "");
$caption = "<span class=\"text-success\"><b>Caption</b></span>";
$craption = "<span class=\"text-danger\"><b>Craption</b></span>";
$caption_type = $edit ? $caption : $craption;
#$button_go_craption = "<a href=\"go.php?id=".$id."&edit=True\" id=\"caption\" class=\"btn btn-default btn-block btn-success\" title=\"Edit this Craption\">Edit this Craption</a>";
#$button_go_edit = "<a href=\"go.php?id=".$id."\" id=\"caption\" class=\"btn btn-default btn-block btn-danger\" title=\"Take a look at the original Craption\">Take a look at the original Craption</a>";
?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
    <?php 
开发者ID:Estevo-Aleixo,项目名称:nmc_20150128,代码行数:31,代码来源:go.php


示例16:

        echo "16";
    }
    ?>
" />
								<p class="explain">
									Sets the width of the bar link button to allow for text instead of just an icon.  Entering 16 will display the icon only. Default: 16
								</p>
							</dd>
						</dl>
						<dl class="selectionBox">
							<dt>
								<label for="link_tab_name">Button Name</label>
							</dt>
							<dd>
								<input type="text" id="link_tab_name" class="selectionText" name="link_tab_name" value="<?php 
    if (var_check('link_tab_name')) {
        echo get_var('link_tab_name');
    }
    ?>
" />
								<p class="explain">
									Sets the text for the bar link button to display next to the icon.  This will only display if the button width is wide enough to display the text.
								</p>
							</dd>
						</dl>
					</fieldset>
					<dl class="selectionBox submitBox">
						<dt></dt>
						<dd>
							<div class="floatr">
								<a class="fwdbutton" onclick="document.forms['add-bar-link'].submit(); return false">
开发者ID:Sywooch,项目名称:forums,代码行数:31,代码来源:pages_manage.php


示例17: while

					<script type="text/javascript">
						$(document).ready(function() {
							$("#template_data").tabby();
						});
					</script>
					<dl class="selectionBox">
						<dt>
							<label for="theme_edit">Theme to Edit</label>
						</dt>
						<dd>
							<select name="edit_theme" onChange="this.form.submit();">
<?php 
    if (!var_check('edit_theme')) {
        $_POST['edit_theme'] = "";
    }
    if (!var_check('edit_template')) {
        $_POST['edit_template'] = "";
    }
    $result = $db->execute("\n\t\tSELECT * \n\t\tFROM arrowchat_themes\n\t");
    while ($row = $db->fetch_array($result)) {
        ?>
									<option value="<?php 
        echo $row['folder'];
        ?>
" <?php 
        if (get_var('edit_theme') == $row['folder'] and !empty($_POST['edit_theme']) or empty($_POST['edit_theme']) and $row['default'] == 1) {
            echo "selected";
        }
        ?>
><?php 
        echo $row['name'];
开发者ID:Lovinity,项目名称:EQM,代码行数:31,代码来源:pages_themes.php


示例18: convert_json_to_VTT

 function convert_json_to_VTT($input)
 {
     // Convert from JSON to VTT format
     $output = "WEBVTT\n\n";
     foreach ($input as $cue) {
         $extra = var_check($cue['extra']);
         $end = $cue['start'] + $cue['dur'];
         $start_ms = str_pad(explode(".", $cue['start'])[1], 3, 0);
         $end_ms = str_pad(explode(".", $end)[1], 3, '0');
         $output .= sprintf($this->format_VTT_header, gmdate("H:i:s", $cue['start']), $start_ms, gmdate("H:i:s", $end), $end_ms, $extra, $cue['value']);
     }
     return $output;
 }
开发者ID:Estevo-Aleixo,项目名称:nmc_20150128,代码行数:13,代码来源:youtube.class.php


示例19: foreach

    if ($usernames) {
        foreach ($usernames as $unbans) {
            $result = $db->execute("\n\t\t\t\t\tDELETE FROM arrowchat_banlist \n\t\t\t\t\tWHERE ban_id = '" . $db->escape_string($unbans) . "'\n\t\t\t\t");
            if ($result) {
                $msg = "The Usernames were successfully unbaned.";
                update_config_file();
            } else {
                $error = "There was a database error";
            }
        }
    } else {
        $error = "You did not select any IPs";
    }
}
// User Edit Submit Processor
if (var_check('user_submit')) {
    $result = $db->execute("\n\t\t\tUPDATE arrowchat_status\n\t\t\tSET hide_bar = '" . get_var('hide_bar') . "',\n\t\t\t\tplay_sound = '" . get_var('play_sound') . "', \n\t\t\t\twindow_open = '" . get_var('window_open') . "', \n\t\t\t\tonly_names = '" . get_var('only_names') . "', \n\t\t\t\tannouncement = '" . get_var('announcement') . "', \n\t\t\t\tis_admin = '" . get_var('is_admin') . "'\n\t\t\tWHERE userid = '" . get_var('user_id') . "'\n\t\t");
    if ($result) {
        $hide_bar = get_var('hide_bar');
        $play_sound = get_var('play_sound');
        $window_open = get_var('window_open');
        $only_names = get_var('only_names');
        $announcement = get_var('announcement');
        $is_admin = get_var('is_admin');
        $msg = "User settings successfully saved.";
    } else {
        $error = "There was an error saving the user's settings.";
    }
}
$smarty->assign('msg', $msg);
$smarty->assign('error', $error);
开发者ID:Sywooch,项目名称:forums,代码行数:31,代码来源:users.php


示例20: get_var

if (var_check('delete') and $do == "notificationsettings") {
    if (empty($_GET['delete'])) {
        $error = "There was no notification ID to delete.";
    }
    if (empty($error)) {
        $result = $db->execute("\n\t\t\t\tDELETE FROM arrowchat_notifications_markup \n\t\t\t\tWHERE id = '" . get_var('delete') . "'\n\t\t\t");
        if ($result) {
            $msg = "Your notification was deleted successfully.  You should delete the mySQL query when this action is called to avoid unnecessary database calls.";
            update_config_file();
        } else {
            $error = "There was a database error.  Please try again.";
        }
    }
}
// Edit Notifications Processor
if (var_check('notification_edit_submit')) {
    if (empty($_POST['edit_notification_name'])) {
        $error = "You must enter a name for this notification.";
    }
    if (empty($_POST['edit_notification_markup'])) {
        $error = "You must enter markup for this notification.";
    }
    if (empty($error)) {
        $markup_data = str_replace("\\r\\n", "\n", get_var('edit_notification_markup'));
        $result = $db->execute("\n\t\t\t\tUPDATE arrowchat_notifications_markup \n\t\t\t\tSET name = '" . get_var('edit_notification_name') . "', \n\t\t\t\t\tmarkup = '" . stripslashes($markup_data) . "' \n\t\t\t\tWHERE id = '" . get_var('notification_id') . "'\n\t\t\t");
        if ($result) {
            $msg = "Your notification was updated successfully.";
        } else {
            $error = "There was a database error.  Please try again.";
        }
    }
开发者ID:Sywooch,项目名称:forums,代码行数:31,代码来源:manage.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP var_dump函数代码示例发布时间:2022-05-23
下一篇:
PHP var_Dump函数代码示例发布时间: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