本文整理汇总了PHP中strip函数的典型用法代码示例。如果您正苦于以下问题:PHP strip函数的具体用法?PHP strip怎么用?PHP strip使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了strip函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
function main($txt, $cmd)
{
global $SIDU;
$eng = $SIDU['eng'];
$txt = @strip($txt, 1, 0, 1);
if ($txt && $cmd) {
$err = @save_data($SIDU, $txt, $eng);
}
if (!$txt) {
$txt = "CREATE TABLE " . ($eng == 'my' ? "`{$SIDU['1']}`.`table_name`" : ($eng == 'pg' ? "\"{$SIDU['2']}\".\"table_name\"" : "table_name")) . "(\ncolname int" . ($eng == 'my' ? "(8)" : "") . ($eng == 'sl' ? "" : " NOT NULL DEFAULT 0") . " PRIMARY KEY,\n\n)";
}
echo "<div class='web'><p class='b dot'>", @lang(4101), " <span class='red'>", $eng == 'my' ? $SIDU[1] : "{$SIDU['1']}.{$SIDU['2']}", "</span></p>";
if ($err) {
echo "<p class='err'>{$err}</p>";
}
echo "<form action='tab-new.php?id={$SIDU['0']},{$SIDU['1']},{$SIDU['2']},{$SIDU['3']},{$SIDU['4']},{$SIDU['5']},{$SIDU['6']}' method='post' name='myform'>\n\t<table><tr><td valign='top'>" . @html_form("textarea", "txt", $txt, 420, 320, "spellcheck='false' class='box'") . "<br /><br />" . @html_form("submit", "cmd", @lang(4102)) . "</td><td valign='top' style='padding-left:10px'>";
$str = "9|0|smallint|smallint(5)\n0|1|32768|smallint(5) unsigned NOT NULL DEFAULT 0\n1|0|int|int(9)\n0|1|2,147,483,647|int(9) unsigned NOT NULL DEFAULT 0\n1|0|numeric|numeric(7,2)\n0|1|(7,2)|numeric(7,2) unsigned NOT NULL DEFAULT 0.00\n2|0|char|char(255)\n0|1|255|char(255) NOT NULL DEFAULT \\'\\'\n0|0|binary|char(255) binary NOT NULL DEFAULT \\'\\'\n1|0|varchar|varchar(255)\n0|1|255|varchar(255) NOT NULL DEFAULT \\'\\'\n0|0|binary|varchar(255) binary NOT NULL DEFAULT \\'\\'\n1|0|text|text\n0|1|65535|text NOT NULL DEFAULT \\'\\'\n2|0|date|date\n0|1|YYYY-MM-DD|date NOT NULL DEFAULT \\'0000-00-00\\'\n1|0|timestamp|timestamp\n0|1|YmdHis|timestamp NOT NULL DEFAULT \\'0000-00-00 00:00:00\\'\n0|0|now|timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP\n2|0|auto|auto_increment\n0|1|!null|NOT NULL\n0|0|PK|NOT NULL auto_increment PRIMARY KEY\n1|0|PK|PRIMARY KEY\n0|1|PK(a)|PRIMARY KEY (col1,col2)\n0|0|UK|UNIQUE uk (col1,col2)\n0|1|idx|INDEX idx (col1,col2)\n2|0|MyISAM|ENGINE = MyISAM\n0|1|InnoDB|ENGINE = InnoDB";
if ($eng == 'pg') {
$str = @strtr($str, @array("smallint(5)" => "smallint", "int(9)" => "int", " DEFAULT \\'0000-00-00\\'" => "", " DEFAULT \\'0000-00-00 00:00:00\\'" => "", "CURRENT_TIMESTAMP" => "now()", "auto|auto_increment" => "serial|serial", "NOT NULL auto_increment" => "serial NOT NULL", "0|0|binary|char(255) binary NOT NULL DEFAULT \\'\\'" => "", "0|0|binary|varchar(255) binary NOT NULL DEFAULT \\'\\'" => "", "MyISAM|ENGINE = MyISAM" => "With OID|WITH (OIDS=TRUE)", "0|1|InnoDB|ENGINE = InnoDB" => "", " unsigned" => "", "PRIMARY KEY (" => "CONSTRAINT pk PRIMARY KEY (", "UNIQUE uk (" => "CONSTRAINT uk UNIQUE (", "idx|INDEX idx (col1,col2)" => "FK|CONSTRAINT fk FOREINGN KEY (col) REFERENCES tab(pk) MATCH SIMPLE\\n\\tON UPDATE NO ACTION ON DELETE NO ACTION"));
} elseif ($eng == 'sl') {
$str = "9|0|int|int,\\n\n0|1|PK|int PRIMARY KEY\n1|0|text|text,\\n\n1|0|real|real,\\n";
}
$arr = @explode("\n", $str);
foreach ($arr as $v) {
@main_add_txt(@trim($v));
}
if ($eng == 'my') {
@main_add_txt("2|0|enum(Y,N)|enum(\\'Y\\',\\'N\\') NOT NULL DEFAULT \\'Y\\',\\n");
}
echo "</td></tr></table></form></div>";
}
示例2: load
function load($config, $mode = 'photostack')
{
if (strpos($config, 'config.php') === false) {
echo 'You are trying to load something other than a configuration file!';
return false;
exit;
} else {
if (include $config) {
define('config', 'yes');
#Stripslashes from input if needed.
$_GET = strip($_GET);
$_POST = strip($_POST);
#define
define('siteName', $siteName);
define('author', $author);
define('separator', $separator);
define('photosName', $photosName);
define('dateFormat', $dateFormat);
define('webDir', preg_replace('/(.*)\\/$/', '$1', $webDir));
define('dirRoot', dirname($dirRoot));
define('storageDir', $storageDir);
define('pageName', $pageName);
define('photostackUsername', $photostackUsername);
define('photostackPassword', $photostackPassword);
define('ftpUsername', $ftpUsername);
define('ftpPassword', $ftpPassword);
define('ftpHost', $ftpHost);
define('ftpDir', $ftpDir);
define('webConfigURL', $webConfigURL);
define('templateIndex', $templateIndex);
define('templateDisplay', $templateDisplay);
define('templateSyndicateIndex', $templateSyndicateIndex);
define('templateSyndicateDisplay', $templateSyndicateDisplay);
define('templateSearch', $templateSearch);
define('albumsSortNatural', $albumsSortNatural);
define('photosSortNatural', $photosSortNatural);
define('photosSortReverse', $photosSortReverse);
define('photosSortByDesc', $photosSortByDesc);
define('photosSortByDate', $photosSortByDate);
define('skipIfContains', $skipIfContains);
define('imageScale', $imageScale);
define('thumbHeight', $thumbHeight);
define('thumbWidth', $thumbWidth);
define('fullSize', $fullSize);
define('caching', $caching);
define('thumbnails', $thumbnails);
define('syndicationType', $syndicationType);
define('timeLimit', $timeLimit);
define('gd2', $gd2);
define('albumListing', $albumListing);
define('photoDesc', $photoDesc);
define('imageDir', $imageDir);
define('tagName', $tagName);
$photostack = new $mode();
}
return true;
}
}
示例3: send
public function send($from, $to, $subject, $content)
{
$from = strip($from);
if (is_array($to)) {
$to = implode(";", $to);
}
$to = strip($to);
$headers = 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-Type: text/html; charset=gbk' . "\n";
//$headers .= "To: $to \n";
$headers .= 'From: ' . $from . "\n";
$subject = "=?gbk?B?" . base64_encode($subject) . "?=";
$result = mail($to, $subject, $content, $headers);
if ($result) {
return true;
} else {
Flow::Log()->w($result);
return false;
}
}
示例4: PRESTAMO_show_dtl
function PRESTAMO_show_dtl()
{
global $db;
global $sAction;
global $sForm;
global $sFileName;
global $sPRESTAMOErr;
global $styles;
$fldPRES_ID = "";
$fldRADI_NUME_RADI = "";
$fldUSUA_LOGIN_ACTU = "";
$fldDEPE_CODI = "";
$fldUSUA_LOGIN_PRES = "";
$fldPRES_DESC = "";
$fldPRES_FECH_PRES = "";
$fldPRES_FECH_DEVO = "";
//-------------------------------
// PRESTAMO Show begin
//-------------------------------
$sFormTitle = "Detalle Préstamo";
$sWhere = "";
$bPK = true;
?>
<table class="FormTABLE">
<form method="POST" action="<?php
echo $sFileName;
?>
" name="PRESTAMO">
<tr><td class="FormHeaderTD" colspan="2"><font class="FormHeaderFONT"><?php
echo $sFormTitle;
?>
</font></td></tr>
<?php
if ($sPRESTAMOErr) {
?>
<tr><td class="DataTD" colspan="2"><font class="DataFONT"><?php
echo $sPRESTAMOErr;
?>
</font></td></tr>
<?php
}
//-------------------------------
// Load primary key and form parameters
//-------------------------------
if ($sPRESTAMOErr == "") {
$fldPRES_ID = get_param("PRES_ID");
$pPRES_ID = get_param("PRES_ID");
} else {
$fldPRES_ID = strip(get_param("PRES_ID"));
$pPRES_ID = get_param("PK_PRES_ID");
}
//-------------------------------
//-------------------------------
// Load all form fields
//-------------------------------
//-------------------------------
// Build WHERE statement
//-------------------------------
if (!strlen($pPRES_ID)) {
$bPK = false;
}
$sWhere .= "PRES_ID=" . tosql($pPRES_ID, "Number");
//-------------------------------
//-------------------------------
// PRESTAMO Open Event begin
// PRESTAMO Open Event end
//-------------------------------
//-------------------------------
// Build SQL statement and execute query
//-------------------------------
$sSQL = "select * from PRESTAMO where " . $sWhere;
// Execute SQL statement
$db->conn->SetFetchMode(ADODB_FETCH_ASSOC);
$rs = $db->query($sSQL);
$bIsUpdateMode = $bPK && !($sAction == "insert" && $sForm == "PRESTAMO") && ($rs && !$rs->EOF);
//-------------------------------
//-------------------------------
// Load all fields into variables from recordset or input parameters
//-------------------------------
if ($bIsUpdateMode) {
$fldDEPE_CODI = $rs->fields["DEPE_CODI"];
$fldPRES_DESC = $rs->fields["PRES_DESC"];
$fldPRES_FECH_DEVO = $rs->fields["PRES_FECH_DEVO"];
$fldPRES_FECH_PRES = $rs->fields["PRES_FECH_PRES"];
$fldPRES_ID = $rs->fields["PRES_ID"];
$fldRADI_NUME_RADI = $rs->fields["RADI_NUME_RADI"];
$fldUSUA_LOGIN_ACTU = $rs->fields["USUA_LOGIN_ACTU"];
$fldUSUA_LOGIN_PRES = $rs->fields["USUA_LOGIN_PRES"];
//-------------------------------
// PRESTAMO ShowEdit Event begin
// PRESTAMO ShowEdit Event end
//-------------------------------
} else {
if ($sPRESTAMOErr == "") {
$fldPRES_ID = tohtml(get_param("PRES_ID"));
}
//-------------------------------
// PRESTAMO ShowInsert Event begin
// PRESTAMO ShowInsert Event end
//.........这里部分代码省略.........
示例5: DMR_DM_PRESTAMO_show
function DMR_DM_PRESTAMO_show()
{
global $db;
global $sAction;
global $sForm;
global $sFileName;
global $sPRESTAMOErr;
global $styles;
global $login_err;
$fldPRES_ID = "";
$fldRADI_NUME_RADI = "";
$fldUSUA_LOGIN_ACTU = "";
$fldDEPE_CODI = "";
$fldPRES_FECH_PEDI = "";
$fldPRES_REQUERIMIENTO = "";
$fldUSUA_LOGIN_PRES = "";
$fldPRES_FECH_PRES = "";
$fldPRES_DESC = "";
$fldPRES_ESTADO = "";
//-------------------------------
// PRESTAMO Show begin
//-------------------------------
$sFormTitle = "Devolución Masiva";
$sWhere = "";
$bPK = true;
$fldPRES_FECH_DEVO = Date('d/m/Y h:i');
?>
<table class="FormTABLE">
<form method="POST" action="<?php
echo $sFileName;
?>
" name="PRESTAMO">
<tr><td class="FormHeaderTD" colspan="2"><font class="FormHeaderFONT"><?php
echo $sFormTitle;
?>
</font></td></tr>
<?php
if ($sPRESTAMOErr) {
?>
<tr><td class="DataTD" colspan="2"><font class="ErrorFONT"><?php
echo $sPRESTAMOErr;
?>
</font></td></tr>
<?php
}
?>
<?php
if (strlen($login_err)) {
?>
<tr><td colspan="2"><font Class="ErrorFONT"><?php
echo $login_err;
?>
</font></td></tr>
<?php
}
?>
<tr>
<td class="FieldCaptionTD">
<font class="FieldCaptionFONT">Fecha de devolución</font>
</td>
<td class="DataTD">
<font class="DataFONT"><input type="hidden" name="PRES_FECH_DEVO" maxlength="15" value="<?php
echo tohtml($fldPRES_FECH_DEVO);
?>
" size="15" ><?php
echo $fldPRES_FECH_DEVO;
?>
</font>
</td>
</tr>
<?php
//-------------------------------
// PRESTAMO Show Event begin
// PRESTAMO Show Event end
//-------------------------------
//-------------------------------
// Load primary key and form parameters
//-------------------------------
if ($sPRESTAMOErr == "") {
$rqd_PRES_ID = get_param("PRES_ID");
$pPRES_ID = get_param("PRES_ID");
$fldUSUA_LOGIN_ACTU = strip(strtoupper(get_param("usuario")));
} else {
$fldUSUA_LOGIN_PRES = strip(get_param("USUA_LOGIN_PRES"));
$fldUSUA_LOGIN_ACTU = strip(get_param("USUA_LOGIN_ACTU"));
$fldPRES_FECH_PRES = strip(get_param("PRES_FECH_PRES"));
$pPRES_ID = get_param("PK_PRES_ID");
}
//-------------------------------
//-------------------------------
// Load all form fields
//-------------------------------
//-------------------------------
// Build WHERE statement
//-------------------------------
$usuario = get_param("usuario");
$usuario = strtoupper($usuario);
if (!strlen($usuario)) {
//.........这里部分代码省略.........
示例6: strip
</tr>
<tr>
<td width="100%">
<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tr class="trform">
<td width="100%"> <?php
echo _ADMIN_ADD_EDIT_CONTACT_1_OTHER;
?>
</td>
</tr>
<tr>
<td width="30%" class="tdinput" align="center">
<textarea name="other" cols="40" rows="5">
<?php
if ($action == "update") {
echo strip($contact->studentcontact_other);
} else {
echo $_POST['other_1'];
}
?>
</textarea>
</td>
</tr>
</table>
</td>
</tr>
</td>
</tr>
<tr>
<td width="100%" align="right">
<input type="submit" name="sumbit" value="<?php
示例7: getExcerptAttribute
/**
* Access control: Abstract (original)
* @return string
*/
public function getExcerptAttribute($value)
{
return strip($value);
}
示例8: generateImage
/**
* 生成图像
*
* @param string $phrase
* @return resource
* @throws Exception
*/
public function generateImage($phrase = null)
{
null == $phrase && ($phrase = $this->generatePhrase());
extract($this->_options);
//解出参数到变量
$image = $this->_createImage();
//创建图像
$defaultSize = min($width, $height * 2) / (strlen($phrase) + 1);
$spacing = (int) ($width * 0.9 / strlen($phrase));
empty($fonts) && ($fonts = YUN_Io::scan(strip($fontDir)));
if (empty($fonts)) {
throw new Exception('未找到任何有效的字体文件');
}
for ($i = 0, $strlen = strlen($phrase); $i < $strlen; $i++) {
$font = $fontDir . '/' . $fonts[array_rand($fonts)];
$color = imagecolorallocate($image, mt_rand(0, 160), mt_rand(0, 160), mt_rand(0, 160));
$angle = mt_rand(-30, 30);
$size = $defaultSize / 10 * mt_rand(12, 14);
$box = imageftbbox($size, $angle, $font, $phrase[$i]);
$x = $spacing / 4 + $i * $spacing + 2;
$y = $height / 2 + ($box[2] - $box[5]) / 4;
imagefttext($image, $size, $angle, $x, $y, $color, $font, $phrase[$i]);
}
$this->_image = $image;
return $this->_image;
}
示例9: _printMethod
/**
* Prints out a table containing the method name and its
* properties.
*
* @param string $name The name of the method.
* @param array $methodproperties The method properties, the information in the method table.
*/
function _printMethod($name, $methodproperties, $selected)
{
// header - Method name and link
$method = '<div id="methods">';
$method .= '<table class="methodTable" style="width:100%" cellspacing="2" cellpadding="3">';
$method .= '<tr class="header"><td class="header" colspan=2>';
$method .= $name . ' - ' . substr($methodproperties['description'], 0, 80) . '</td>';
$method .= '</td></tr>';
foreach ($methodproperties as $property => $value) {
if (!is_array($value)) {
$method .= $this->_printMethodProp($property, $value);
} else {
$method .= $this->_printArgs($property, $value);
}
}
$methodName = $name;
if ($methodproperties['access'] == 'remote') {
$arguments = $this->testMethod($name);
$method .= '<form action="' . $_SERVER['PHP_SELF'] . '?class=' . substr($this->_classpath, 0, -4) . '&method=' . $name . '&action=exec" method="POST" id="form">' . "\n";
$method .= '<tr><td class="formcaption" colspan="2">Arguments</td></tr>' . "\n";
$key = 0;
foreach ($arguments as $key => $name) {
$method .= '<tr class="caption"><td class="key">' . $name . '</td><td><input class="inputbox" type="text" name="' . $methodName . '_arguments[]" maxlength="65535" value="' . htmlspecialchars(strip($_POST[$methodName . "_arguments"][$key])) . '"/></td></tr>' . "\n";
}
//$method .= '<tr><td class="formcaption" colspan="2">Optional arguments</td></tr>';
//for($i = 0; $i < 5; $i++) {
// $method .= '<tr class="inputrow"><td class="key">arg' . ($i + 1) . '</td><td><input class="inputbox" type="text" name="' . $methodName . '_arguments[]" maxlength="65535" value="' . htmlspecialchars(strip($_POST[$methodName . "_arguments"][$i + $key + 1])) . '"/></td></tr>'."\n";
//}
$method .= '<tr><td class="formcaption" colspan="2">Authentication</td></tr>' . "\n";
$method .= '<tr class="inputrow"><td class="key">Username</td><td><input class="inputbox" type="text" name="username" maxlength="65535" value="' . htmlspecialchars(strip($_POST['username'])) . '"/></td></tr>' . "\n";
$method .= '<tr class="inputrow"><td class="key">Password</td><td><input class="inputbox" type="text" name="password" maxlength="65535" value="' . htmlspecialchars(strip($_POST['password'])) . '"/></td></tr>' . "\n";
$method .= '<tr class="inputrow"><td colspan="2" class="submitbtn"><input type="submit">' . "\n";
$method .= '</td></tr></form>' . "\n";
}
$method .= '</table></div>';
return $method;
}
示例10: D_PRESTAMO_show
function D_PRESTAMO_show()
{
global $db;
global $sAction;
global $sForm;
global $sFileName;
global $sPRESTAMOErr;
global $styles;
$fldPRES_ID = "";
$fldPRES_FECH_DEVO = "";
$fldPRES_DESC = "";
$fldPRES_ESTADO = "";
//-------------------------------
// PRESTAMO Show begin
//-------------------------------
$sFormTitle = "Devolucion";
$sWhere = "";
$bPK = true;
?>
<table class="FormTABLE">
<form method="POST" action="<?php
echo $sFileName;
?>
" name="PRESTAMO">
<tr><td class="FormHeaderTD" colspan="2"><font class="FormHeaderFONT"><?php
echo $sFormTitle;
?>
</font></td></tr>
<?php
if ($sPRESTAMOErr) {
?>
<tr><td class="DataTD" colspan="2"><font class="DataFONT"><?php
echo $sPRESTAMOErr;
?>
</font></td></tr>
<?php
}
//-------------------------------
// Load primary key and form parameters
//-------------------------------
if ($sPRESTAMOErr == "") {
$fldPRES_ID = get_param("PRES_ID");
$pPRES_ID = get_param("PRES_ID");
} else {
$fldPRES_ID = strip(get_param("PRES_ID"));
$fldPRES_FECH_DEVO = strip(get_param("PRES_FECH_DEVO"));
$fldPRES_DESC = strip(get_param("PRES_DESC"));
$fldPRES_ESTADO = strip(get_param("PRES_ESTADO"));
$pPRES_ID = get_param("PK_PRES_ID");
}
//-------------------------------
//-------------------------------
// Load all form fields
//-------------------------------
//-------------------------------
// Build WHERE statement
//-------------------------------
if (!strlen($pPRES_ID)) {
$bPK = false;
}
$sWhere .= "PRES_ID=" . tosql($pPRES_ID, "Number");
//-------------------------------
//-------------------------------
// PRESTAMO Open Event begin
// PRESTAMO Open Event end
//-------------------------------
//-------------------------------
// Build SQL statement and execute query
//-------------------------------
$sSQL = "select * from PRESTAMO where " . $sWhere;
// Execute SQL statement
$rs = $db->query($sSQL);
$bIsUpdateMode = $bPK && !($sAction == "insert" && $sForm == "PRESTAMO") && ($rs && !$rs->EOF);
//-------------------------------
//-------------------------------
// Load all fields into variables from recordset or input parameters
//-------------------------------
if ($bIsUpdateMode) {
$fldPRES_ID = $rs->fields["PRES_ID"];
//-------------------------------
// Load data from recordset when form displayed first time
//-------------------------------
if ($sPRESTAMOErr == "") {
$fldPRES_FECH_DEVO = $rs->fields["PRES_FECH_DEVO"];
$fldPRES_DESC = $rs->fields["PRES_DESC"];
$fldPRES_ESTADO = $rs->fields["PRES_ESTADO"];
}
//-------------------------------
// PRESTAMO ShowEdit Event begin
// PRESTAMO ShowEdit Event end
//-------------------------------
} else {
if ($sPRESTAMOErr == "") {
$fldPRES_ID = tohtml(get_param("PRES_ID"));
$fldPRES_FECH_DEVO = Date('d-M-y');
}
//-------------------------------
// PRESTAMO ShowInsert Event begin
// PRESTAMO ShowInsert Event end
//.........这里部分代码省略.........
示例11: run_sqls
function run_sqls()
{
global $SIDU;
$conn = $SIDU['conn'][$SIDU[0]];
$eng = $conn[1];
$cook = $SIDU['cook'][$SIDU[0]];
@tm_use_db($cook[1], $cook[2]);
if ($_GET['sql'] == 'show vars') {
$_POST['sqlcur'] = $eng == 'pg' ? 'SHOW ALL' : 'SHOW VARIABLES';
} elseif (@substr($_GET['sql'], 0, 6) == 'FLUSH ') {
if ($_GET['sql'] == 'FLUSH ALL') {
$_POST['sqlcur'] = "FLUSH LOGS;\nFLUSH HOSTS;\nFLUSH PRIVILEGES;\nFLUSH TABLES;\nFLUSH STATUS;\nFLUSH DES_KEY_FILE;\nFLUSH QUERY CACHE;\nFLUSH USER_RESOURCES;\nFLUSH TABLES WITH READ LOCK";
} else {
$_POST['sqlcur'] = $_GET['sql'];
}
} elseif (@substr($_GET['sql'], 0, 9) == 'STATScol:') {
$_POST['sqlcur'] = "SELECT " . @goodname(@substr($_GET['sql'], 9)) . ",count(*) FROM " . @goodname($cook[4]) . " GROUP BY 1 ORDER BY 2 DESC,1 LIMIT 20";
} elseif ($_GET['sql']) {
$_POST['sqlcur'] = $_GET['sql'];
}
$arr = @explode(chr(10), @strip($_POST['sqlcur'], 1, 0, 1));
foreach ($arr as $v) {
$v = @trim($v);
if ($v) {
$arr2[] = $v;
}
}
$txt = @implode(chr(10), $arr2);
$arr = @explode(";" . chr(10), $txt);
foreach ($arr as $i => $sql) {
$time_start = @microtime(true);
$res = $eng == 'my' ? @mysql_query($sql) : ($eng == 'pg' ? @pg_query($sql) : @sqlite_query($SIDU['dbL'], $sql));
$time_end = @microtime(true);
$time = @round(($time_end - $time_start) * 1000);
$SIDU[5] += $time;
$err = @sidu_err(1);
$RES[$i][0] = $sql;
if ($err) {
$RES[$i][1] = $err;
$SIDU[8]++;
} else {
$RES[$i][3] = $eng == 'my' ? @mysql_num_rows($res) : ($eng == 'pg' ? @pg_num_rows($res) : @sqlite_num_rows($res));
if ($eng == 'pg' && !$RES[$i][3]) {
$RES[$i][2] = @pg_affected_rows($res);
if (!$RES[$i][2]) {
unset($RES[$i][2]);
}
}
//there is no function: sqlite_affected_rows()
if ($RES[$i][3] === false && $eng == 'my') {
$RES[$i][2] = @mysql_affected_rows();
}
if (!isset($SIDU[6]) && $RES[$i][3] !== false) {
$SIDU[6] = $i;
$RES[$i][5] = @get_sql_col($res, $eng);
$RES[$i][6] = @get_sql_data($res, $eng);
} elseif ($_POST['sqlmore'] && $RES[$i][3] !== false) {
$RES[$i][5] = @get_sql_col($res, $eng);
$RES[$i][6] = @get_sql_data($res, $eng);
}
$RES[$i][4] = $time;
}
@tm_his_log('S', $sql, $time, $err);
}
$SIDU[7] = ++$i;
$SIDU['RES'] = $RES;
//reset cookie
if ($eng == 'my') {
$db = @mysql_fetch_row(@mysql_query("SELECT database()"));
if ($db[0] != $cook[1]) {
$ck = @array($conn[0], $db[0]);
}
} elseif ($eng == 'pg') {
$db[0] = @pg_dbname();
if ($db[0] != $cook[1]) {
$ck = @array($conn[0], $db[0]);
} else {
//sch
$sch = pg_fetch_row(pg_query("SHOW search_path"));
if (@substr($sch[0], 0, 8) == '"$user",') {
$sch[0] = @substr($sch[0], 8);
}
$sch[0] = @str_replace('"', '', $sch[0]);
if ($sch[0] != $cook[2]) {
$ck = @array($conn[0], $cook[1], $sch[0]);
}
}
}
if (isset($ck)) {
@update_sidu_cook($ck);
}
}
示例12: Pedidos_Show
function Pedidos_Show()
{
// De sesi�n
global $db;
global $krd;
//usuario actual
global $dependencia;
//dependencia del usuario actual
global $ruta_raiz;
// Control de visualizaci�n
global $sFileName;
global $opcionMenu;
global $pageAnt;
// Pagina de la cual viene
// Valores
global $fechaFinal;
global $fechaInicial;
// Set variables with search parameters
$ps_PRES_ESTADO = strip(get_param("s_PRES_ESTADO"));
$ps_RADI_NUME_RADI = strip(trim(get_param("s_RADI_NUME_RADI")));
$ps_USUA_LOGIN = strip(trim(get_param("s_USUA_LOGIN")));
$ps_DEPE_NOMB = strip(get_param("s_DEPE_NOMB"));
$ps_USUA_NOMB = strip(get_param("s_USUA_NOMB"));
$ps_hora_limite = strip(get_param("s_hora_limite"));
$ps_minuto_limite = strip(get_param("s_minuto_limite"));
$ps_meridiano = strip(get_param("s_meridiano"));
$ps_PRES_REQUERIMIENTO = strip(get_param("s_PRES_REQUERIMIENTO"));
if (strlen($pageAnt) == 0) {
// Build SQL
include_once $ruta_raiz . "/include/query/prestamo/builtSQL1.inc";
include_once $ruta_raiz . "/include/query/prestamo/builtSQL2.inc";
include_once $ruta_raiz . "/include/query/prestamo/builtSQL3.inc";
// Build ORDER statement
$iSort = strip(get_param("FormPedidos_Sorting"));
$iSorted = strip(get_param("FormPedidos_Sorted"));
$sDirection = strip(get_param("s_Direction"));
if ($iSorted != $iSort) {
$sDirection = " DESC ";
} else {
if (strcasecmp($sDirection, " DESC ") == 0) {
$sDirection = " ASC ";
} else {
$sDirection = " DESC ";
}
}
$sOrder = " order by " . $iSort . $sDirection . ",PRESTAMO_ID";
// Inicializa el titulo y la visibilidad de los resultados
include_once "inicializarRTA.inc";
// Execute SQL statement
$db->conn->SetFetchMode(ADODB_FETCH_ASSOC);
$rs = $db->query($sSQL . $sOrder);
$db->conn->SetFetchMode(ADODB_FETCH_NUM);
// Process empty recordset
if (!$rs || $rs->EOF) {
?>
<p align="center" class="titulosError2">NO HAY REGISTROS SELECCIONADOS</p>
<?php
return;
}
// Build parameters for order
$form_params_search = "s_RADI_NUME_RADI=" . tourl($ps_RADI_NUME_RADI) . "&s_USUA_LOGIN=" . tourl($ps_USUA_LOGIN) . "&s_DEPE_NOMB=" . tourl($ps_DEPE_NOMB) . "&s_USUA_NOMB=" . tourl($ps_USUA_NOMB) . "&s_PRES_REQUERIMIENTO=" . tourl($ps_PRES_REQUERIMIENTO) . "&s_PRES_ESTADO=" . tourl($ps_PRES_ESTADO) . "&fechaInicial=" . tourl($fechaInicial) . "&fechaFinal=" . tourl($fechaFinal) . "&s_hora_limite=" . tourl($ps_hora_limite) . "&s_minuto_limite=" . tourl($ps_minuto_limite) . "&s_meridiano=" . tourl($ps_meridiano);
$form_params_page = "&FormPedidos_Page=1&FormStarPage=1&FormSiguiente=0";
$form_params = $form_params_search . $form_params_page . "&opcionMenu=" . tourl($opcionMenu) . "&krd=" . tourl($krd) . "&FormPedidos_Sorted=" . tourl($iSort) . "&s_Direction=" . tourl($sDirection) . "&FormPedidos_Sorting=";
// HTML column prestamo headers
?>
<form method="post" action="prestamo.php" name="rta">
<input type="hidden" value='<?php
echo $krd;
?>
' name="krd">
<input type="hidden" value=" " name="radicado">
<input type="hidden" value="" name="prestado">
<input type="hidden" name="opcionMenu" value="<?php
echo $opcionMenu;
?>
">
<!-- orden de presentaci�n del resultado en el formulario de envio !-->
<input type="hidden" name="FormPedidos_Sorting" value="<?php
echo $iSort;
?>
">
<input type="hidden" name="FormPedidos_Sorted" value="<?php
echo $iSorted;
?>
">
<input type="hidden" name="s_Direction" value="<?php
echo $sDirection;
?>
">
<table border=0 cellpadding=0 cellspacing=2 class='borde_tab' width="100%">
<tr>
<td class="titulos4" colspan="<?php
echo $numCol;
?>
"><a name="Search"><?php
echo $tituloRespuesta[$opcionMenu];
?>
</a></td>
</tr>
<?php
//.........这里部分代码省略.........
示例13: fread
$serial = fread("", "/sys/block/" . $prefix . "/../../../../../../serial");
} else {
$serial = "";
}
$vendor = fread("", "/sys/block/" . $prefix . "/device/vendor");
$model = fread("", "/sys/block/" . $prefix . "/device/model");
$size = fread("", "/sys/block/" . $prefix . "/size") * 512;
$cnt = query($XMLBASE . "/disk#") + 1;
$diskp = $XMLBASE . "/disk:" . $cnt;
set($XMLBASE . "/count", $cnt);
set($diskp . "/uid", toupper($prefix));
set($diskp . "/vendor", strip($vendor));
set($diskp . "/model", strip($model));
set($diskp . "/mfact", strip($mfact));
set($diskp . "/product", strip($product));
set($diskp . "/serial", strip($serial));
set($diskp . "/size", $size);
}
if ($pid != "0" || $fs != "UNKNOWN") {
/* add new entry */
if ($base == "") {
$cnt = query($diskp . "/entry#") + 1;
$base = $diskp . "/entry:" . $cnt;
} else {
if ($fs != "UNKNOWN") {
$cnt = query($diskp . "/entry#");
} else {
return;
}
}
set($diskp . "/count", $cnt);
示例14: enterroom
$SERVER['ENABLE_SOUNDS'] = 1;
}
$XUSER['POPUPPM'] = $r[9];
if (isset($changeroom)) {
if ($room != @$X2CHATR && $room != "") {
enterroom($room);
$senduseragreeting = 1;
@exitroom($X2CHATR);
}
$X2CHATR = $room;
@setcookie("X2CHATR", "{$room}", time() + 14000000, "{$SERVER['PATH']}");
}
if ((@$X2CHATR == "" || !isset($X2CHATR)) && !isset($croom1) && !isset($croom2)) {
$listrooms = true;
}
$ROOMS['IN_ROOM_NAME'] = @strip($X2CHATR);
$q = DoQuery("SELECT * FROM {$SERVER['TBL_PREFIX']}rooms WHERE name='{$ROOMS['IN_ROOM_NAME']}'");
$row = Do_Fetch_Row($q);
$ROOMS['id'] = $row[0];
if ($row[2] == 1) {
$ROOMS['TYPE'] = "Public";
} else {
$ROOMS['TYPE'] = "Private";
}
if ($row[3] == 1) {
$ROOMS['LOG'] = "1";
// Used to be ENCRYPTED but since encryption isn't supported I use this field for logging
} else {
$ROOMS['LOG'] = "0";
}
$ROOMS['GREETING'] = $row[4];
示例15: ConnectionHandler
}
$verrad = "";
include_once "{$ruta_raiz}/include/db/ConnectionHandler.php";
$db = new ConnectionHandler($ruta_raiz);
/*********************************************************************************
* Filename: menu_prestamo.php
* Modificado:
* 1/3/2006 IIAC Menú del módulo de préstamos. Carga e inicializa los
* formularios.
*********************************************************************************/
// prestamo CustomIncludes begin
include "common.php";
// Save Page and File Name available into variables
$sFileName = "menu_prestamo.php";
// Variables de control
$opcionMenu = strip(get_param("opcionMenu"));
?>
<html>
<head>
<title>Archivo - Manejo de prestamos y devoluciones</title>
<link rel="stylesheet" href="../estilos/orfeo.css" type="text/css">
</head>
<body class="PageBODY">
<form method="post" action="prestamo.php" name="menu">
<input type="hidden" name="opcionMenu" value="1">
<input type="hidden" name="sFileName" value="<?php
echo $sFileName;
?>
">
<input type="hidden" value='<?php
echo $krd;