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


PHP Get_Account_Id函数代码示例

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


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

示例1: Get_Account_Id

<?php

if ($already_initialized != 1) {
    require "./inc/script_inicialization.php";
    require "./inc/nrp_api.php";
}
if (!isset($num_errors)) {
    $num_errors = 0;
}
if (!isset($num_alerts)) {
    $num_alerts = 0;
}
if (Validate_Session($complete_sess_id, $_SERVER['REMOTE_ADDR'], $bd)) {
    Get_Account_Id($sess_id, $account_id, $bd);
    if ($account_id != 'admin') {
        $error[$num_errors++] = "You are not the administrator";
        include "logout.php";
        exit;
    }
} else {
    $error[$num_errors++] = "Invalid Session ID";
    include "logout.php";
    exit;
}
$result_xsl = "xsl/" . $default_xsl . "/adm_accounts.xsl";
$smarty->assign("nrpTransform", $result_xsl);
$smarty->assign("nrpSchErrors", $error);
$smarty->assign("nrpSchAlerts", $alert);
$smarty->assign("nrpMasterSessId", $master_session);
$smarty->assign("nrpSessId", $complete_sess_id);
$smarty->assign("nrpUserId", $account_id);
开发者ID:magsilva,项目名称:NoRiskPlanning,代码行数:31,代码来源:adm_accounts.php

示例2: Get_Account_Id

 Get_Account_Id($sess_id, $account_id, $bd);
 if ($_GET['is_pop'] || $_POST['is_pop']) {
     $is_pop = 1;
 }
 if (!empty($_GET['is_pop'])) {
     $_POST['beg_time'] = $_GET['beg_time'];
     $_POST['end_time'] = $_GET['end_time'];
     $_POST['day'] = $_GET['day'];
     $_POST['month'] = $_GET['month'];
     $_POST['year'] = $_GET['year'];
 }
 $m_session = Get_Master_Session($sess_id, $bd);
 if (!$master_session) {
     $owner = $account_id;
 } else {
     Get_Account_Id($m_session, $owner, $bd);
 }
 $query = "SELECT * FROM accounts WHERE account_id = '{$account_id}'";
 $result = $bd->Query($query);
 $role = $bd->FetchResult($result, 0, 'role');
 $var_type = $role . '_type';
 $var_color = $role . '_color';
 $var_image = $role . '_icon';
 $array_type = $cfg[$var_type];
 $array_color = $cfg[$var_color];
 $array_image = $cfg[$var_image];
 if ($is_pop) {
     $result_xsl = "xsl/" . $default_xsl . "/sch_ins_app_pop.xsl";
 } else {
     $result_xsl = "xsl/" . $default_xsl . "/sch_ins_app.xsl";
 }
开发者ID:magsilva,项目名称:NoRiskPlanning,代码行数:31,代码来源:sch_ins_app.php

示例3: Get_Account_Id

    require "./inc/script_inicialization.php";
    require_once "./inc/nrp_api.php";
}
if (!isset($num_errors)) {
    $num_errors = 0;
}
if (!isset($num_alerts)) {
    $num_alerts = 0;
}
if (Validate_Session($complete_sess_id, $_SERVER['REMOTE_ADDR'], $bd)) {
    Get_Account_Id($sess_id, $account_id, $bd);
    $master_session = Get_Crypt_Master_Session($sess_id, $bd);
    if (!$master_session) {
        $owner = $account_id;
    } else {
        Get_Account_Id($master_session, $owner, $bd);
    }
    $query = "SELECT * FROM accounts WHERE account_id = '{$account_id}'";
    $result = $bd->Query($query);
    $role = $bd->FetchResult($result, 0, 'role');
    $var_type = $role . '_type';
    $var_color = $role . '_color';
    $var_image = $role . '_icon';
    $array_type = $cfg[$var_type];
    $array_color = $cfg[$var_color];
    $array_image = $cfg[$var_image];
    if (!empty($_POST['search'])) {
        $apps1 = Search_Appointments($account_id, $_POST['key'], $cfg['time'], $array_type, $array_color, $array_image, $cfg['days'], $bd);
        $apps2 = Search_Weekly_Appointments($account_id, $_POST['key'], $cfg['time'], $array_type, $array_color, $array_image, $cfg['days'], $bd);
        $apps = array_merge($apps1, $apps2);
        $result_xsl = "xsl/" . $cfg['default_xsl'] . "/search_res.xsl";
开发者ID:magsilva,项目名称:NoRiskPlanning,代码行数:31,代码来源:search.php

示例4: listAppointments

function listAppointments($complete_sess_id, $beg_date, $end_date, $beg_time, $end_time, $type)
{
    // Validate user session code
    if (!Validate_Session($complete_sess_id, $_SERVER['REMOTE_ADDR'], $GLOBALS['bd'])) {
        return "Invalid session ID!";
    }
    // Get the user account ID
    $sess_id = substr($complete_sess_id, 32);
    Get_Account_Id($sess_id, $account_id, $GLOBALS['bd']);
    // Get information about appointments types available
    $query = "SELECT * FROM accounts WHERE account_id = '{$account_id}'";
    $result = $GLOBALS['bd']->Query($query);
    $role = $GLOBALS['bd']->FetchResult($result, 0, 'role');
    $var_type = $role . '_type';
    // Set app types, times and days of week (see inc/config.inc.php)
    $app_times = $GLOBALS['cfg']['time'];
    $app_types = $GLOBALS['cfg'][$var_type];
    $days_of_week = $GLOBALS['cfg']['days'];
    // Convert $beg_time and $end_time to NoRisk values
    // see (inc/config.inc.php to see how norisk store this values
    // XXX Check if value is between first_time and last_time?
    $aux = split(":", $beg_time);
    $nrp_beg_time = $aux[0] - $GLOBALS['cfg']['first_time'];
    $aux = split(":", $end_time);
    $nrp_end_time = $aux[0] - $GLOBALS['cfg']['first_time'];
    // Get the list of appointments for this user
    // (does not include the weekly ones)
    $apps = List_Appointments($account_id, '', '', '', $beg_date, $end_date, $nrp_beg_time, $nrp_end_time, '', '', $app_times, $app_types, '', '', $days_of_week, $GLOBALS['bd']);
    // If there are no results, return an empty array instead of a null
    if ($apps == null) {
        return array();
    }
    // Make the returning array
    $apps_list = array();
    foreach ($apps as $app) {
        $aux = array('app_id' => $app['0'], 'description' => $app['2'], 'beg_time' => $app['8'], 'end_time' => $app['10'], 'date' => $app['16'], 'type' => $app['12'], 'url' => $app['17'], 'owner' => $app['18']);
        array_push($apps_list, $aux);
    }
    // Return the appotinments list
    return $apps_list;
}
开发者ID:magsilva,项目名称:NoRiskPlanning,代码行数:41,代码来源:services.php


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