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


PHP set_var函数代码示例

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


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

示例1: get_table_flash_bbcode_pkids

function get_table_flash_bbcode_pkids($table_name, $id_field, $content_field, $uid_field, $bitfield_field)
{
	global $db;

	$ids = array();

	$sql = "SELECT $id_field, $content_field, $uid_field, $bitfield_field
		FROM $table_name
		WHERE $content_field LIKE '%[/flash:%'
			AND $bitfield_field <> ''";

	$result = $db->sql_query($sql);
	while ($row = $db->sql_fetchrow($result))
	{
		$uid = $row[$uid_field];

		// thanks support toolkit
		$content = html_entity_decode_utf8($row[$content_field]);
		set_var($content, $content, 'string', true);
		$content = utf8_normalize_nfc($content);

		$bitfield_data = $row[$bitfield_field];

		if (!is_valid_flash_bbcode($content, $uid) && has_flash_enabled($bitfield_data))
		{
			$ids[] = (int) $row[$id_field];
		}
	}
	$db->sql_freeresult($result);

	return $ids;
}
开发者ID:naderman,项目名称:phpbb-orchestra,代码行数:32,代码来源:check_flash_bbcodes.php

示例2: request_var

function request_var($var_name, $default = '', $multibyte = false, $regex = '')
{
    if (!isset($_REQUEST[$var_name]) || is_array($_REQUEST[$var_name]) && !is_array($default) || is_array($default) && !is_array($_REQUEST[$var_name])) {
        return is_array($default) ? w() : $default;
    }
    $var = $_REQUEST[$var_name];
    if (!is_array($default)) {
        $type = gettype($default);
        $var = $var;
    } else {
        list($key_type, $type) = each($default);
        $type = gettype($type);
        $key_type = gettype($key_type);
    }
    if (is_array($var)) {
        $_var = $var;
        $var = w();
        foreach ($_var as $k => $v) {
            if (is_array($v)) {
                foreach ($v as $_k => $_v) {
                    set_var($k, $k, $key_type);
                    set_var($_k, $_k, $key_type);
                    set_var($var[$k][$_k], $_v, $type, $multibyte);
                }
            } else {
                set_var($k, $k, $key_type);
                set_var($var[$k], $v, $type, $multibyte);
            }
        }
    } else {
        set_var($var, $var, $type, $multibyte);
    }
    return $var;
}
开发者ID:nopticon,项目名称:noptc,代码行数:34,代码来源:core.php

示例3: login_func

function login_func($xmlrpc_params)
{
    global $auth, $user, $config, $db, $phpbb_root_path, $phpEx;
    $params = php_xmlrpc_decode($xmlrpc_params);
    $user->setup('ucp');
    $username = $params[0];
    $password = $params[1];
    $viewonline = isset($params[2]) ? !$params[2] : 1;
    set_var($username, $username, 'string', true);
    set_var($password, $password, 'string', true);
    header('Set-Cookie: mobiquo_a=0');
    header('Set-Cookie: mobiquo_b=0');
    header('Set-Cookie: mobiquo_c=0');
    $login_result = $auth->login($username, $password, true, $viewonline);
    $usergroup_id = array();
    if ($login_result['status'] == LOGIN_SUCCESS) {
        $auth->acl($user->data);
        //add tapatalk_users here,for push service
        if ($params[3] == '1' && push_table_exists()) {
            global $table_prefix;
            $sql = "SELECT * FROM " . $table_prefix . "tapatalk_users where userid = '" . $user->data['user_id'] . "'";
            $result = $db->sql_query($sql);
            $userInfo = $db->sql_fetchrow($result);
            $db->sql_freeresult($result);
            $time = time();
            if (empty($userInfo)) {
                $sql_data[$table_prefix . "tapatalk_users"]['sql'] = array('userid' => $user->data['user_id'], 'announcement' => 1, 'pm' => 1, 'subscribe' => 1, 'quote' => 1, 'tag' => 1, 'newtopic' => 1, 'updated' => time());
                $sql = 'INSERT INTO ' . $table_prefix . "tapatalk_users" . ' ' . $db->sql_build_array('INSERT', $sql_data[$table_prefix . "tapatalk_users"]['sql']);
                $db->sql_query($sql);
            } else {
                $sql = "UPDATE " . $table_prefix . "tapatalk_users \n\t        \tSET updated= '" . time() . "' WHERE userid='" . $user->data['user_id'] . "'";
                $db->sql_query($sql);
            }
        }
        // Compatibility with mod NV who was here
        if (file_exists($phpbb_root_path . 'includes/mods/who_was_here.' . $phpEx)) {
            include_once $phpbb_root_path . 'includes/mods/who_was_here.' . $phpEx;
            if (class_exists('phpbb_mods_who_was_here') && method_exists('phpbb_mods_who_was_here', 'update_session')) {
                @phpbb_mods_who_was_here::update_session();
            }
        }
    } else {
        $error_msg = str_replace('%s', '', strip_tags($user->lang[$login_result['error_msg']]));
        return new xmlrpcresp(new xmlrpcval(array('result' => new xmlrpcval(false, 'boolean'), 'result_text' => new xmlrpcval($error_msg, 'base64')), 'struct'));
    }
    if ($config['max_attachments'] == 0) {
        $config['max_attachments'] = 100;
    }
    $usergroup_id[] = new xmlrpcval($user->data['group_id']);
    $can_readpm = $config['allow_privmsg'] && $auth->acl_get('u_readpm') && ($user->data['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'));
    $can_sendpm = $config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user->data['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'));
    $can_upload = $config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && (function_exists('phpbb_is_writable') ? phpbb_is_writable($phpbb_root_path . $config['avatar_path']) : 1) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false;
    $can_search = $auth->acl_get('u_search') && $auth->acl_getf_global('f_search') && $config['load_search'];
    $can_whosonline = $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel');
    $max_filesize = $config['max_filesize'] === '0' || $config['max_filesize'] > 10485760 ? 10485760 : $config['max_filesize'];
    $response = new xmlrpcval(array('result' => new xmlrpcval(true, 'boolean'), 'user_id' => new xmlrpcval($user->data['user_id'], 'string'), 'username' => new xmlrpcval($user->data['username'], 'base64'), 'usergroup_id' => new xmlrpcval($usergroup_id, 'array'), 'icon_url' => new xmlrpcval(get_user_avatar_url($user->data['user_avatar'], $user->data['user_avatar_type']), 'string'), 'post_count' => new xmlrpcval($user->data['user_posts'], 'int'), 'can_pm' => new xmlrpcval($can_readpm, 'boolean'), 'can_send_pm' => new xmlrpcval($can_sendpm, 'boolean'), 'can_moderate' => new xmlrpcval($auth->acl_get('m_') || $auth->acl_getf_global('m_'), 'boolean'), 'max_attachment' => new xmlrpcval($config['max_attachments'], 'int'), 'max_png_size' => new xmlrpcval($max_filesize, 'int'), 'max_jpg_size' => new xmlrpcval($max_filesize, 'int'), 'can_search' => new xmlrpcval($can_search, 'boolean'), 'can_whosonline' => new xmlrpcval($can_whosonline, 'boolean'), 'can_upload_avatar' => new xmlrpcval($can_upload, 'boolean')), 'struct');
    return new xmlrpcresp($response);
}
开发者ID:autonomous1,项目名称:tapatalk-phpbb3,代码行数:58,代码来源:login.php

示例4: show_navigation

function show_navigation($start_with)
{
    start_form("", "get");
    if ($start_with > 0) {
        echo get_href("<p>Previous", set_var(get_current_url(), "start", max(0, $start_with - SHOW_ITEMS)));
    } else {
        echo "Previous";
    }
    echo " ";
    echo get_href("Next", set_var(get_current_url(), "start", $start_with + SHOW_ITEMS));
    end_form();
}
开发者ID:HuniyaArif,项目名称:mosesdecoder,代码行数:12,代码来源:index.php

示例5: titania_decode_message

/**
* Decode a message from the database (properly)
*
* @param string $message
* @param mixed $bbcode_uid
*/
function titania_decode_message(&$message, $bbcode_uid = '')
{
    decode_message($message, $bbcode_uid);
    // We have to do all sorts of crap because decode_message doesn't properly decode a message for reinserting into the database
    // Replace &nbsp; with spaces - otherwise a number of issues happen...
    $message = str_replace('&nbsp;', ' ', $message);
    // Decode HTML entities, else bbcode reparsing will fail
    $message = html_entity_decode($message);
    // With magic_quotes_gpc on slashes are stripped too many times, so add them
    $message = STRIP ? addslashes($message) : $message;
    // Run set_var to re-encode the proper entities as if the user had submitted it themselves
    set_var($message, $message, 'string', true);
}
开发者ID:kairion,项目名称:customisation-db,代码行数:19,代码来源:functions.php

示例6: db_start

function db_start()
{
    $config = get_config('database');
    $retval = false;
    $db = @mysqli_connect($config->host, $config->user, $config->pass, $config->name);
    if (mysqli_connect_errno()) {
        add_errors(mysqli_connect_error());
    } else {
        if (!mysqli_set_charset($db, 'utf8')) {
            add_errors(mysqli_error($db));
        } else {
            set_var('db', $db);
            $retval = true;
        }
    }
    return $retval;
}
开发者ID:londomloto,项目名称:immortal,代码行数:17,代码来源:database.php

示例7: update_push_status_func

function update_push_status_func($xmlrpc_params)
{
    global $db, $auth, $user, $config, $table_prefix;
    $params = php_xmlrpc_decode($xmlrpc_params);
    if (!empty($params[1]) && !empty($params[2]) && empty($user->data['is_registered'])) {
        $user->setup('ucp');
        $username = $params[1];
        $password = $params[2];
        $viewonline = 1;
        set_var($username, $username, 'string', true);
        set_var($password, $password, 'string', true);
        header('Set-Cookie: mobiquo_a=0');
        header('Set-Cookie: mobiquo_b=0');
        header('Set-Cookie: mobiquo_c=0');
        $auth->login($username, $password, true, $viewonline);
    }
    if ($user->data['is_registered'] == 1) {
        $update_params = array();
        if (isset($params[0]['all'])) {
            $update_params['announcement'] = $params[0]['all'] ? 1 : 0;
            $update_params['pm'] = $params[0]['all'] ? 1 : 0;
            $update_params['subscribe'] = $params[0]['all'] ? 1 : 0;
            $update_params['quote'] = $params[0]['all'] ? 1 : 0;
            $update_params['tag'] = $params[0]['all'] ? 1 : 0;
            $update_params['newtopic'] = $params[0]['all'] ? 1 : 0;
        } else {
            $update_params['announcement'] = isset($params[0]['ann']) ? $params[0]['ann'] : 1;
            $update_params['pm'] = isset($params[0]['pm']) ? $params[0]['pm'] : 1;
            $update_params['subscribe'] = isset($params[0]['sub']) ? $params[0]['sub'] : 1;
            $update_params['quote'] = isset($params[0]['quote']) ? $params[0]['quote'] : 1;
            $update_params['tag'] = isset($params[0]['tag']) ? $params[0]['tag'] : 1;
            $update_params['newtopic'] = isset($params[0]['newtopic']) ? $params[0]['newtopic'] : 1;
        }
        $sql = 'UPDATE ' . $table_prefix . "tapatalk_users SET announcement = '" . $update_params['announcement'] . "',pm='" . $update_params['pm'] . "',\n\t\tsubscribe = '" . $update_params['subscribe'] . "',quote = '" . $update_params['quote'] . "',tag = '" . $update_params['tag'] . "',newtopic='" . $update_params['newtopic'] . "'\n\t\tWHERE userid = '" . $user->data['user_id'] . "'";
        $result = $db->sql_query($sql);
        if ($result) {
            return new xmlrpcresp(new xmlrpcval(true, 'boolean'));
        } else {
            return new xmlrpcresp(new xmlrpcval(false, 'boolean'));
        }
    }
}
开发者ID:autonomous1,项目名称:tapatalk-phpbb3,代码行数:42,代码来源:update_push_status.php

示例8: concat

    //----------------------------------------------------------------------------------------------------
    // Cargamos el comboBOX de usuarios
    //----------------------------------------------------------------------------------------------------
    $q = "SELECT id, usuario, concat(nombre,' ',apellido) as nombre FROM usuarios WHERE activo='1' ORDER BY usuario";
    $res = ejecutar_sql($db, $q);
    if (!$res) {
        echo $db->ErrorMsg();
        //die();
    } else {
        $combobox_usuarios = "<option value='-1'>Seleccione una...</option>";
        while (!$res->EOF) {
            $combobox_usuarios = $combobox_usuarios . "<option value=" . $res->fields[0] . ">" . $res->fields[1] . ' - ' . $res->fields[2] . "</option>";
            $res->MoveNext();
        }
    }
    set_var("v_listado_usuarios", $combobox_usuarios);
}
set_var("v_color_cabezera_tabla", COLOR_ENCOMIENDAS_CABEZERA_TABLA);
set_var("v_color_cabezera_columna", COLOR_ENCOMIENDAS_CABEZERA_COLUMNA);
set_var("v_color_origen", COLOR_FONDO_CARGA_DATOS_PASAJE_ORIGEN);
set_var("v_color_destino", COLOR_FONDO_CARGA_DATOS_PASAJE_DESTINO);
set_var("v_color_foco_grilla", COLOR_PASAJES_FOCO);
set_var("v_total_listado", "0.00");
set_var("v_total_pago_listado", "0.00");
set_var("v_cant_total_pasajes", "0");
set_var("v_cant_total_pagos", "0");
set_var("v_total_comision_listado", "0.00");
parse('resumenpasajes');
pparse('resumenpasajes');
desconectar($db);
include_once "pie_paginas.php";
开发者ID:scintes,项目名称:sistemas,代码行数:31,代码来源:resumen_pasajes.php

示例9: request_var

/**
* request_var
*
* Used to get passed variable
*/
function request_var($var_name, $default, $multibyte = false, $cookie = false)
{
    if (!$cookie && isset($_COOKIE[$var_name])) {
        if (!isset($_GET[$var_name]) && !isset($_POST[$var_name])) {
            return is_array($default) ? array() : $default;
        }
        $_REQUEST[$var_name] = isset($_POST[$var_name]) ? $_POST[$var_name] : $_GET[$var_name];
    }
    if (!isset($_REQUEST[$var_name]) || is_array($_REQUEST[$var_name]) && !is_array($default) || is_array($default) && !is_array($_REQUEST[$var_name])) {
        return is_array($default) ? array() : $default;
    }
    $var = $_REQUEST[$var_name];
    if (!is_array($default)) {
        $type = gettype($default);
    } else {
        list($key_type, $type) = each($default);
        $type = gettype($type);
        $key_type = gettype($key_type);
        if ($type == 'array') {
            reset($default);
            $default = current($default);
            list($sub_key_type, $sub_type) = each($default);
            $sub_type = gettype($sub_type);
            $sub_type = $sub_type == 'array' ? 'NULL' : $sub_type;
            $sub_key_type = gettype($sub_key_type);
        }
    }
    if (is_array($var)) {
        $_var = $var;
        $var = array();
        foreach ($_var as $k => $v) {
            set_var($k, $k, $key_type);
            if ($type == 'array' && is_array($v)) {
                foreach ($v as $_k => $_v) {
                    if (is_array($_v)) {
                        $_v = null;
                    }
                    set_var($_k, $_k, $sub_key_type);
                    set_var($var[$k][$_k], $_v, $sub_type, $multibyte);
                }
            } else {
                if ($type == 'array' || is_array($v)) {
                    $v = null;
                }
                set_var($var[$k], $v, $type, $multibyte);
            }
        }
    } else {
        set_var($var, $var, $type, $multibyte);
    }
    return $var;
}
开发者ID:Phatboy82,项目名称:phpbbgarage,代码行数:57,代码来源:functions.php

示例10: set_var

// porcentaje del coseguro usado en pasajes.
// ---------------------------------------------------------------------
$mensaje_error_conexion = "error en la conexión de mysql: ";
$mensaje_error_ado = "error al crear el componente ado";
// ---------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
//  configuracion de color para encomiendas
//-------------------------------------------------------------------------------------------------
set_var('v_color_encomiendas_remitente', '#f2f5a9');
set_var('v_color_encomiendas_destinatario', '#d1ffd3');
set_var('v_color_encomiendas_fila_comun', '#ffffff');
// usado en el archivo buscar_encomienda_a_cerrar.php; cierre
set_var('v_color_encomiendas_fila_tipo_pago_en_destino', '#f78181');
set_var('v_color_encomiendas_fila_tipo_pago_contado', '#bcf5a9');
set_var('v_color_encomiendas_fila_tipo_pago_ctacte', '#a9d0f5');
set_var('v_color_encomiendas_cabezera_tabla', '#ffcc33');
set_var('v_color_encomiendas_cabezera_columna', '#b3b4fa');
set_var('v_color_encomiendas_pie_tabla', '#fbcfe1');
//-------------------------------------------------------------------------------------------------
//  configuracion de color para pasajes
//-------------------------------------------------------------------------------------------------
set_var('v_color_pasajes_fila_comun', '#ffffff');
// usado en el archivo buscar_pasajes_a_cerrar.php; cierre
set_var('v_color_pasajes_fila_tipo_pago_en_destino', '#f78181');
set_var('v_color_pasajes_foco', '#f2f5a9');
set_var('v_color_pasajes_seleccionado', '#bef781');
set_var('v_color_viaje_diario_listado', '#e2a5b8');
set_var('v_color_viaje_especial_listado', '#a5e2ad');
set_var('v_color_fondo_carga_datos_pasaje_origen', "#f2f5a9");
set_var('v_color_fondo_carga_datos_pasaje_destino', '#d0f5a9');
pparse('configuracion');
开发者ID:scintes,项目名称:sistemas,代码行数:31,代码来源:configuracion.php

示例11: adm_page_confirm

function adm_page_confirm($title, $message)
{
    global $_CLASS;
    // Grab data from GET and POST arrays ... note this is _not_
    // validated! Everything is typed as string to ensure no
    // funny business on displayed hidden field data. Validation
    // will be carried out by whatever processes this form.
    $var_ary = array_merge($_GET, $_POST);
    $s_hidden_fields = '';
    foreach ($var_ary as $key => $var) {
        if (empty($var)) {
            continue;
        }
        if (is_array($var)) {
            foreach ($var as $k => $v) {
                if (is_array($v)) {
                    foreach ($v as $_k => $_v) {
                        set_var($var[$k][$_k], $_v, 'string');
                        $s_hidden_fields .= "<input type=\"hidden\" name=\"{$key}[{$k}][{$_k}]\" value=\"" . addslashes($_v) . '" />';
                    }
                } else {
                    set_var($var[$k], $v, 'string');
                    $s_hidden_fields .= "<input type=\"hidden\" name=\"{$key}[{$k}]\" value=\"" . addslashes($v) . '" />';
                }
            }
        } else {
            set_var($var, $var, 'string');
            $s_hidden_fields .= '<input type="hidden" name="' . $key . '" value="' . addslashes($var) . '" />';
        }
        unset($var_ary[$key]);
    }
    ?>

<br /><br />

<form name="confirm" method="post" action="<?php 
    echo $_SERVER['REQUEST_URI'];
    ?>
">
<table class="tablebg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
	<tr>
		<th><?php 
    echo $title;
    ?>
</th>
	</tr>
	<tr>
		<td class="row1" align="center"><?php 
    echo $message;
    ?>
<br /><br /><input class="btnlite" type="submit" name="confirm" value="<?php 
    echo $_CLASS['core_user']->lang['YES'];
    ?>
" />&nbsp;&nbsp;<input class="btnmain" type="submit" name="cancel" value="<?php 
    echo $_CLASS['core_user']->lang['NO'];
    ?>
" /></td>
	</tr>
</table>

<?php 
    echo $s_hidden_fields;
    ?>
</form>

<br />

<?php 
    adm_page_footer();
}
开发者ID:BackupTheBerlios,项目名称:viperals-svn,代码行数:70,代码来源:index.php

示例12: while

    while (!$res->EOF) {
        $combobox_bancos = $combobox_bancos . "<option value=" . $res->fields[0] . ">" . $res->fields[1] . "</option>";
        $res->MoveNext();
    }
}
set_var("v_comboBox_banco", $combobox_bancos);
//------------------------------------------------------------------------------
// verificamos que no se llame a este archivo desde pasajes_adelantados para no
// cargar todo el sql al dope
if ($llamado != 1) {
    //----------------------------------------------------------------------------------------------------
    //----------------------------------------------------------------------------------------------------
    // Cargamos el comboBOX de Cuentas de pasajes adelantados
    //----------------------------------------------------------------------------------------------------
    $q = "SELECT pa.codigo, pa.cantidad, pa.fecha_emision, cl.dni, cl.razon_social\n          FROM pasajes_adelantados AS pa\n          INNER JOIN clientes AS cl ON pa.id_cliente = cl.codigo\n          ORDER BY cl.razon_social ASC ";
    $res = ejecutar_sql($db, $q);
    if (!$res) {
        echo $db->ErrorMsg();
        //die();
    } else {
        $combobox_cuenta = "<option value=0>Seleccione uno...</option>";
        while (!$res->EOF) {
            $combobox_cuenta = $combobox_cuenta . "<option value=" . $res->fields[0] . "@" . $res->fields[1] . ">" . $res->fields[4] . " - " . $res->fields[1] . "</option>";
            $res->MoveNext();
        }
    }
    set_var("v_comboBox_cuenta", $combobox_cuenta);
}
parse('pagar_pasaje');
pparse('pagar_pasaje');
desconectar($db);
开发者ID:scintes,项目名称:sistemas,代码行数:31,代码来源:pagar_pasaje.php

示例13: header

<?php

include "_functions.php";
header("Cache: private");
$s_fileName = basename(__FILE__);
$s_pageName = "Order Status";
$s_server = "65.175.107.2:3306";
$s_userName = "webapp";
$s_password = "alvahugh";
$s_db = "braddoro";
$s_publicID = set_var('pid', 0);
$o_conn = mysql_connect($server = $s_server, $username = $s_userName, $password = $s_password);
if (!$o_conn) {
    die_well(__LINE__, mysql_error());
}
$o_sel = mysql_select_db($s_db);
if (!$o_sel) {
    die_well(__LINE__, mysql_error());
}
$s_header = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . $g_break;
$s_header .= '<html xmlns="http://www.w3.org/1999/xhtml">' . $g_break;
$s_header .= '<head>' . $g_break;
$s_header .= '<meta name="generator" content="' . $s_pageName . '" />' . $g_break;
$s_header .= '<title>' . $s_pageName . '</title>' . $g_break;
$s_header .= '<link rel="stylesheet" href="eve2.css">' . $g_break;
$s_header .= '</head>' . $g_break;
$s_header .= '<body class="body">' . $g_break;
$s_header .= '<span class="title">' . $s_pageName . '</span>' . $g_break;
$s_header .= '<br /><br />' . $g_break;
echo $s_header;
$page_task = $s_page_task;
开发者ID:braddoro,项目名称:braddoro,代码行数:31,代码来源:item.php

示例14: set_var

            set_var("v_sucursal", $res->fields[14]);
            parse('imprimir_resumenpasajes_pagos');
            $v_total_lis = $v_total_lis + $res->fields[9];
            $v_total_pagos_lis = $v_total_pagos_lis + $res->fields[8];
            $v_total_comision_lis = $v_total_comision_lis + $res->fields[11];
            $res->MoveNext();
        }
        // fin del while
    }
}
desconectar($db);
set_var("v_cant_total", $cant);
set_var("v_total_listado", number_format($v_total_lis, 2));
set_var("v_total_pagos_listado", number_format($v_total_pagos_lis, 2));
set_var("v_total_comision_listado", number_format($v_total_comision_lis, 2));
set_var("v_color_cabezera_columna_tabla", COLOR_ENCOMIENDAS_CABEZERA_COLUMNA);
pparse("imprimir_resumen_pasajes");
// Impresion en PDF
$htmlbuffer = ob_get_contents();
ob_clean();
try {
    $fecha = date("ymdhm");
    //   $html2pdf = new HTML2PDF('P', 'A4', 'es');
    $html2pdf = new HTML2PDF('P', 'A4', 'es', false, 'utf-8', array(5, 5, 5, 5));
    $html2pdf->pdf->SetDisplayMode('fullpage');
    $html2pdf->writeHTML($htmlbuffer, isset($_GET['vuehtml']));
    $html2pdf->Output('./resumen_pasajes' . $fecha . '.pdf', 'I');
} catch (HTML2PDF_exception $e) {
    echo $e;
    exit;
}
开发者ID:scintes,项目名称:sistemas,代码行数:31,代码来源:imprimir_resumen_pasajes.php

示例15: header

include "_functions.php";
header("Cache: private");
$s_filename = basename(__FILE__);
$s_pageName = "My Goal";
//&mdash;
$s_server = "65.175.107.2:3306";
$s_userName = "webapp";
$s_password = "alvahugh";
$s_db = "braddoro";
$i_g = set_var('g', 0);
$i_a = set_var('a', 0);
$i_pct = $i_a / $i_g;
$i_baseHeight = 200;
$i_redHeight = $i_baseHeight * $i_pct;
$i_greenHeight = $i_baseHeight - $i_redHeight;
$s_t = set_var('t', 'My Goal');
/*
$o_conn = mysql_connect($server=$s_server,$username=$s_userName,$password=$s_password);
if (!$o_conn) {die_well(__LINE__,mysql_error());}
$o_sel = mysql_select_db($s_db);
if (!$o_sel) {die_well(__LINE__,mysql_error());}
if ($i_chapterID == 0 && $i_paragraphID == 0) {
	$s_sql = 'select chapterID, paragraphID, chapterName, paragraph from braddoro.suntzu order by RAND() limit 1;';
} else {
	$s_sql = 'select chapterID, paragraphID, chapterName, paragraph from braddoro.suntzu where chapterID = '.$i_chapterID.' and paragraphID = '.$i_paragraphID.' limit 1;';
}
$q_data = mysql_query($s_sql);
if (!$q_data) {die_well(__LINE__,mysql_error());}
while ($rowData = mysql_fetch_row($q_data)) {
	$i_chapterID = $rowData[0];
	$i_paragraphID = $rowData[1];
开发者ID:braddoro,项目名称:braddoro,代码行数:31,代码来源:mygoal.php


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