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


PHP init_var函数代码示例

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


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

示例1: draw_paged_result

 function draw_paged_result($javascript = '')
 {
     $this->html_output = '';
     //If there is more than one page, show the pager
     if ($this->total_pages > 1) {
         init_var($Result_Pager);
         $this->html_output .= "Page " . $this->current_page . " of " . $this->total_pages . " | Go to page: <input type=\"text\" name=\"result_pager\" value=\"{$Result_Pager}\" size=\"2\" {$javascript}>" . "<input type=\"submit\" name=\"pager_submit\" value=\"GO\">&nbsp;" . "<input type=\"hidden\" name=\"current_page\" value=\"" . $this->current_page . "\">";
     } else {
         $this->html_output = "Page " . $this->current_page . " of " . $this->total_pages . '&nbsp;';
     }
     return $this->html_output;
 }
开发者ID:seans888,项目名称:APC-CPO,代码行数:12,代码来源:base_paged_result_class.php

示例2: init_cobalt

//Cobalt on the web: http://cobalt.jvroig.com
//******************************************************************
require 'path.php';
init_cobalt('Add user role');
$show_result = false;
if (isset($_GET['filter_field_used']) && isset($_GET['filter_used']) && isset($_GET['page_from'])) {
    $role_id = $_GET['role_id'];
    require 'components/get_listview_referrer.php';
    $role_name = cobalt_load_class('user_role')->get_role_name($role_id)->dump['role'];
}
if (xsrf_guard()) {
    init_var($_POST['btn_cancel']);
    init_var($_POST['btn_back']);
    init_var($_POST['btn_submit']);
    init_var($_POST['find']);
    init_var($_POST['passportButton']);
    require 'components/query_string_standard.php';
    $role_id = $_POST['role_id'];
    $role_name = $_POST['role_name'];
    if ($_POST['btn_cancel'] || $_POST['btn_back']) {
        log_action('Pressed cancel button', $_SERVER['PHP_SELF']);
        redirect("listview_user_role.php?{$query_string}");
    }
    if ($_POST['btn_submit']) {
        //Get all users with the role
        require 'subclasses/user.php';
        $obj_user = new user();
        $obj_user->get_role_users($role_id);
        $lst_user = $obj_user->lst_user;
        if (isset($obj_user->dump['username'])) {
            $arr_user = $obj_user->dump['username'];
开发者ID:seans888,项目名称:APC-CPO,代码行数:31,代码来源:role_permissions_cascade.php

示例3: init_cobalt

<?php

//******************************************************************
//This file was generated by Cobalt, a rapid application development
//framework developed by JV Roig (jvroig@jvroig.com).
//
//Cobalt on the web: http://cobalt.jvroig.com
//******************************************************************
require 'path.php';
init_cobalt('Delete refstudent');
if (isset($_GET['student_id'])) {
    $student_id = urldecode($_GET['student_id']);
    require_once 'form_data_refstudent.php';
} elseif (xsrf_guard()) {
    init_var($_POST['btn_cancel']);
    init_var($_POST['btn_delete']);
    require 'components/query_string_standard.php';
    if ($_POST['btn_cancel']) {
        log_action('Pressed cancel button', $_SERVER['PHP_SELF']);
        redirect("listview_refstudent.php?{$query_string}");
    } elseif ($_POST['btn_delete']) {
        log_action('Pressed delete button', $_SERVER['PHP_SELF']);
        require_once 'subclasses/refstudent.php';
        $dbh_refstudent = new refstudent();
        $object_name = 'dbh_refstudent';
        require 'components/create_form_data.php';
        $dbh_refstudent->del($arr_form_data);
        redirect("listview_refstudent.php?{$query_string}");
    }
}
require 'subclasses/refstudent_html.php';
开发者ID:seans888,项目名称:APC-CPO,代码行数:31,代码来源:delete_refstudent.php

示例4: init_cobalt

<?php

//******************************************************************
//This file was generated by Cobalt, a rapid application development
//framework developed by JV Roig (jvroig@jvroig.com).
//
//Cobalt on the web: http://cobalt.jvroig.com
//******************************************************************
require 'path.php';
init_cobalt('View user passport groups');
if (isset($_GET['passport_group_id'])) {
    $passport_group_id = urldecode($_GET['passport_group_id']);
    require 'form_data_user_passport_groups.php';
}
if (xsrf_guard()) {
    init_var($_POST['btn_back']);
    if ($_POST['btn_back']) {
        log_action('Pressed cancel button');
        require 'components/query_string_standard.php';
        redirect("listview_user_passport_groups.php?{$query_string}");
    }
}
require 'subclasses/user_passport_groups_html.php';
$html = new user_passport_groups_html();
$html->draw_header('Detail View: User Passport Groups', $message, $message_type);
$html->draw_listview_referrer_info($filter_field_used, $filter_used, $page_from, $filter_sort_asc, $filter_sort_desc);
$html->detail_view = TRUE;
$html->draw_controls('view');
$html->draw_footer();
开发者ID:seans888,项目名称:APC-CPO,代码行数:29,代码来源:detailview_user_passport_groups.php

示例5: init_var

        <tr>
            <td align="center">
            <?php 
$html->draw_text_field('', 'username', FALSE, 'text', FALSE, 'id="username" size="37" autocomplete="off" placeholder="Username"');
?>
            </td>
        </tr>
        <tr>
            <td align="center">
                <?php 
$html->draw_text_field('', 'password', FALSE, 'password', FALSE, 'maxlength="' . MAX_PASSWORD_LENGTH . '" size="37" autocomplete="off" placeholder="Password"');
?>
            </td>
        </tr>
        <tr>
            <td align="center">
                <input type=submit value="LOG IN" name="btnSubmit">
                <?php 
init_var($error_message);
$_SESSION['icon_set'] = 'cobalt';
$html->display_error($error_message);
?>
            </td>
        </tr>
        </table>
    </fieldset>
</div>
</form>
</body>
</html>
开发者ID:seans888,项目名称:APC-CPO,代码行数:30,代码来源:login.php

示例6: init_var

    $ModuleOptions = $_GET['ModuleOptions'];
    $KeywordSearch = $_GET['KeywordSearch'];
    $IPAddressOptions = $_GET['IPAddressOptions'];
    $TimeStart = $_GET['TimeStart'];
    $TimeEnd = $_GET['TimeEnd'];
    $Username = $_GET['Username'];
    $Module = $_GET['Module'];
    $Keyword = $_GET['Keyword'];
    $IPAddress = $_GET['IPAddress'];
    if (isset($_GET['current_page'])) {
        $current_page = $_GET['current_page'];
    }
    $CREATE_FILTERS = TRUE;
}
if (xsrf_guard()) {
    init_var($_POST['btn_cancel']);
    if ($_POST['btn_cancel']) {
        log_action("Pressed cancel button", $_SERVER['PHP_SELF']);
        echo "<script>window.close()</script>";
    }
    if (isset($_POST['start'])) {
        $start = $_POST['start'];
    }
    $DateTimeOptions = $_POST['DateTimeOptions'];
    $UserOptions = $_POST['UserOptions'];
    $ModuleOptions = $_POST['ModuleOptions'];
    $KeywordSearch = $_POST['KeywordSearch'];
    $IPAddressOptions = $_POST['IPAddressOptions'];
    $TimeStart = $_POST['TimeStart'];
    $TimeEnd = $_POST['TimeEnd'];
    $Username = $_POST['Username'];
开发者ID:seans888,项目名称:APC-CPO,代码行数:31,代码来源:security_monitor2.php

示例7: stmt_fetch

 function stmt_fetch($result_type = 'array')
 {
     $this->stmt_execute();
     if ($this->num_rows > 0) {
         $result = $this->stmt;
         //Valid types are 'single' and 'array'.
         //Default is 'array', and for robustness any other value
         //simply gets treated as 'array';
         //Get number of fields
         $num_fields = $result->field_count;
         //create temporary bind result vars
         $arr_results = array();
         for ($a = 0; $a < $num_fields; ++$a) {
             $var_name = 'col' . $a;
             ${$var_name} = '';
             $arr_results[] =& ${$var_name};
         }
         call_user_func_array(array($this->stmt, 'bind_result'), $arr_results);
         //Get the field names
         $meta = $result->result_metadata();
         $arr_fieldnames = array();
         for ($a = 0; $a < $num_fields; ++$a) {
             $field = $meta->fetch_field();
             $arr_fieldnames[] = $field->name;
         }
         //Result = single record, no need for arrays to store the result set
         if (strtoupper($result_type) == 'SINGLE') {
             $result->fetch();
             for ($b = 0; $b < $num_fields; ++$b) {
                 $field_name = $arr_fieldnames[$b];
                 $value = $arr_results[$b];
                 $this->dump[$field_name] = $value;
             }
         } else {
             for ($a = 0; $a < $this->num_rows; ++$a) {
                 $result->fetch();
                 for ($b = 0; $b < $num_fields; ++$b) {
                     $field_name = $arr_fieldnames[$b];
                     $value = $arr_results[$b];
                     init_var($this->dump[$field_name]);
                     if (is_array($this->dump[$field_name])) {
                     } else {
                         $this->dump[$field_name] = array();
                     }
                     $this->dump[$field_name][] = $value;
                 }
             }
         }
     }
     return $this;
 }
开发者ID:seans888,项目名称:APC-CPO,代码行数:51,代码来源:data_abstraction_class.php

示例8: drawTextField

?>
<div class="container_mid">
<fieldset class="top">
New List
</fieldset>

<fieldset class="middle">
<table class="input_form">
<?php 
drawTextField('List Name', 'List_Name');
drawTextField('Remarks', '', '', 'Textarea');
drawMultiFieldStart('List Items');
if ($numParticulars < 1) {
    $numParticulars = 1;
}
for ($a = 0; $a < $numParticulars; $a++) {
    init_var($List_Item[$a]);
    echo "<li style='margin: 5'><input type='text' name='List_Item[{$a}]' value='{$List_Item[$a]}'>";
}
drawMultiFieldEnd();
?>
</table>
</fieldset>
<fieldset class="bottom">
<?php 
drawSubmitCancel();
?>
</fieldset>
</div>
<?php 
drawFooter();
开发者ID:seans888,项目名称:APC-CPO,代码行数:31,代码来源:CreatePredefinedLists.php

示例9: init_SCV2

<?php

require 'Core/SCV2_Core.php';
init_SCV2();
if (xsrf_guard()) {
    init_var($_POST['btnSubmit']);
    init_var($_POST['CreateDBConnections']);
    init_var($_POST['CreatePages']);
    init_var($_POST['CreatePredefinedLists']);
    init_var($_POST['CreateTables']);
    init_var($_POST['CreateUsers']);
    init_var($_POST['DefineTableFields']);
    init_var($_POST['DefineTableRelations']);
    init_var($_POST['ImportDBConnection']);
    if ($_POST['btnSubmit']) {
        header("location: {$_POST['location']}");
        exit;
    } elseif ($_POST['CreateDBConnections']) {
        header("location: /cobalt/Screens/CreateDBConnections.php");
        exit;
    } elseif ($_POST['CreatePages']) {
        header("location: /cobalt/Screens/CreatePages.php");
        exit;
    } elseif ($_POST['CreatePredefinedLists']) {
        header("location: /cobalt/Screens/CreatePredefinedLists.php");
        exit;
    } elseif ($_POST['CreateTables']) {
        header("location: /cobalt/Screens/CreateTables.php");
        exit;
    } elseif ($_POST['CreateUsers']) {
        header("location: /cobalt/Screens/CreateUsers.php");
开发者ID:seans888,项目名称:APC-CPO,代码行数:31,代码来源:success.php

示例10: init_var

<?php

require_once 'components/get_max_attachment_size.php';
init_var($max_attachment_height);
init_var($max_attachment_width);
$existing_file_upload_control_name = 'existing_' . $file_upload_control_name;
for ($a = 0; $a < ${$mf_upload_counter_name}; ++$a) {
    $empty_previous_file = FALSE;
    $upload_destination_file = '';
    $orig_filename = basename(str_replace("", '', $_FILES[$file_upload_control_name]['name'][$a]));
    if (empty($_FILES[$file_upload_control_name]['name'][$a])) {
        $extension = pathinfo($_POST[$existing_file_upload_control_name][$a], PATHINFO_EXTENSION);
    } else {
        $extension = pathinfo($orig_filename, PATHINFO_EXTENSION);
    }
    if ($extension == '' && empty($_FILES[$file_upload_control_name]['name'][$a])) {
        //No file uploaded at all. We treat it as "allowed extension"
        //since we aren't blocking an invalid file type. The fact that it is empty
        //will be caught by other checks below.
        $allowed_extension = TRUE;
    } else {
        //Verify that file extension is in whitelist
        $allowed_extension = FALSE;
        require_once 'upload_generic_whitelist.php';
        if (in_array(strtolower($extension), $arr_good_extensions)) {
            //in whitelist, good
            $allowed_extension = TRUE;
        } else {
            $empty_previous_file = TRUE;
        }
    }
开发者ID:seans888,项目名称:Bgy-Project,代码行数:31,代码来源:upload_generic_mf.php

示例11: ini_set

/**
 * @file    index
 * @author  ryan <cumt.xiaochi@gmail.com>
 * app logic
 * 此框架由王霄池纯粹手写而成,当然参照了不少鸡爷的框架,也参照了 LazyPHP
 */
// 打开错误提示
ini_set('display_errors', 1);
// 在 SAE 上 ini_set() 不起作用,但也不会报错
error_reporting(E_ALL);
define('IN_APP', 1);
define('DS', DIRECTORY_SEPARATOR);
define('APP_ROOT', __DIR__ . DS);
define('CORE_ROOT', APP_ROOT . 'core' . DS);
include APP_ROOT . 'config/common.php';
// if not debug, mute all error reportings
if (!(defined('DEBUG') ? DEBUG : 0)) {
    ini_set('display_errors', 0);
    error_reporting(0);
}
require CORE_ROOT . 'function.php';
require CORE_ROOT . 'app.php';
init_var();
init_env();
require_once CORE_ROOT . 'BasicModel.php';
// 似乎可以到autoloader里面去
$user_lib_file = APP_ROOT . 'lib' . DS . 'function.php';
if (file_exists($user_lib_file)) {
    require_once $user_lib_file;
}
execute_logic();
开发者ID:TheDenisNovikov,项目名称:teacher,代码行数:31,代码来源:index.php

示例12: extract

        $data = $result->fetch_assoc();
        extract($data);
    } else {
        die($mysqli->error);
    }
}
if (xsrf_guard()) {
    init_var($_POST['btnCancel']);
    init_var($_POST['btnSubmit']);
    if ($_POST['btnCancel']) {
        header("location: " . HOME_PAGE);
        exit;
    }
    if ($_POST['btnSubmit']) {
        extract($_POST);
        init_var($Database_Connection_ID);
        $errMsg = scriptCheckIfNull('Project Name', $Project_Name, 'Client Name', $Client_Name, 'Description', $Project_Description, 'Base Directory', $Base_Directory, 'Database Connection', $Database_Connection_ID);
        if ($errMsg == "") {
            $select = "SELECT `Project_ID` FROM `project` WHERE `Project_Name`='{$Project_Name}' AND `Project_ID`!='{$Orig_Project_ID}'";
            $error = "The project name '{$Project_Name}' already exists. Please choose a new one. <br>";
            $errMsg = scriptCheckIfUnique($select, $error);
            if ($errMsg == "") {
                queryUpdateProject($_POST);
                header("location: ../success.php?success_tag=EditProject");
                exit;
            }
        }
    }
}
drawHeader();
drawPageTitle('Edit Project', $errMsg);
开发者ID:seans888,项目名称:APC-CPO,代码行数:31,代码来源:Edit_Project.php

示例13: init_var

<?php

init_var($chosen_skill);
if ($chosen_skill == "") {
    $html->fields['skill_id']['control_type'] = 'hidden';
} else {
    $html->fields['skill_id']['list_settings']['query'] = "SELECT skill.skill_id AS `Queried_skill_id`, skill.skill_name FROM skill WHERE skill.skill_set_id = {$chosen_skill} ORDER BY skill_name ASC";
}
开发者ID:seans888,项目名称:Bgy-Project,代码行数:8,代码来源:set_skill.php

示例14: count

<?php

$html_subclass = $reporter->html_subclass;
$title = $reporter->report_title;
$arr_fields = $reporter->arr_rpt_fields;
$num_fields = count($arr_fields);
$arr_operators = $reporter->arr_operators;
$operator_settings = array('items' => $arr_operators, 'values' => $arr_operators);
$html = cobalt_load_class($html_subclass);
$html->draw_header($title, $message, $message_type);
require_once FULLPATH_BASE . 'javascript/reporting_tool.php';
$html->draw_container_div_start();
$html->draw_fieldset_header('Report Details');
$html->draw_fieldset_body_start();
$reporter->draw_report_interface_header();
init_var($show_field);
init_var($sum_field);
init_var($count_field);
init_var($group_field1);
init_var($group_field2);
init_var($group_field3);
开发者ID:seans888,项目名称:APC-CPO,代码行数:21,代码来源:reporter_interface_head.php

示例15: foreach

 }
 if (isset($_POST[$count_var])) {
     $arr_form_data[$count_var] = $_POST[$count_var];
 }
 foreach ($child->fields as $field_name => $metadata) {
     $cf_name = 'cf_' . $child->table_name . '_' . $field_name;
     if (isset($_POST[$cf_name])) {
         $arr_form_data[$cf_name] = $_POST[$cf_name];
     }
     if ($metadata['control_type'] == 'date controls') {
         $var_year_element = 'cf_' . $child->table_name . '_' . $metadata['date_elements'][0];
         $var_month_element = 'cf_' . $child->table_name . '_' . $metadata['date_elements'][1];
         $var_day_element = 'cf_' . $child->table_name . '_' . $metadata['date_elements'][2];
         init_var($arr_form_data[$var_year_element]);
         init_var($arr_form_data[$var_month_element]);
         init_var($arr_form_data[$var_day_element]);
         $num_dates = 0;
         if (isset($_POST[$var_year_element])) {
             $arr_form_data[$var_year_element] = $_POST[$var_year_element];
             $num_dates = count($_POST[$var_year_element]);
         }
         if (isset($_POST[$var_month_element])) {
             $arr_form_data[$var_month_element] = $_POST[$var_month_element];
         }
         if (isset($_POST[$var_day_element])) {
             $arr_form_data[$var_day_element] = $_POST[$var_day_element];
         }
         for ($a = 0; $a < $num_dates; ++$a) {
             $arr_form_data[$cf_name][$a] = $arr_form_data[$var_year_element][$a] . '-' . $arr_form_data[$var_month_element][$a] . '-' . $arr_form_data[$var_day_element][$a];
             if (strlen($arr_form_data[$cf_name][$a]) < 10) {
                 $arr_form_data[$cf_name][$a] = '';
开发者ID:seans888,项目名称:APC-CPO,代码行数:31,代码来源:create_form_data.php


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