本文整理汇总了PHP中OUT函数的典型用法代码示例。如果您正苦于以下问题:PHP OUT函数的具体用法?PHP OUT怎么用?PHP OUT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OUT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLesson
function getLesson($id)
{
global $db;
$fnk_result = array();
$query = "SELECT `name`, `duration` FROM `lessons` WHERE `lid` = '" . mysql_real_escape_string(trim($id)) . "'";
$result = mysql_query($query) or die(OUT(mysql_error()));
$row = mysql_fetch_array($result, MYSQL_ASSOC);
//TODO if (mysql result count) != 1 then ERROR
return $row;
}
示例2: getTraining
function getTraining($id)
{
global $db;
$query = "SELECT tt.id, tt.date, WEEKDAY(tt.`date`) as `weekday`, DATE_FORMAT(tt.`time_start`, '%H:%i') as time_start, DATE_FORMAT(tt.`time_end`, '%H:%i') as time_end, tt.hall, tt.trainer, tt.lesson, tr.name as trainer_name, tr.phone, le.name as lesson_name, le.color\nFROM `training_times` as tt JOIN (`trainers` as tr, `lessons` as le) ON ( tt.trainer = tr.tid AND tt.lesson = le.lid)\nWHERE tt.id = {$id}";
//OUT($query);
$result = mysql_query($query) or die(OUT(mysql_error()));
$row = mysql_fetch_array($result, MYSQL_ASSOC);
//TODO if (mysql result count) != 1 then ERROR
return $row;
}
示例3: getLessons
function getLessons()
{
global $db;
$fnk_result = array();
$query = "SELECT `lid`, `name` FROM `lessons` ORDER BY `name`";
$result = mysql_query($query) or die(OUT(mysql_error()));
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$fnk_result[$row['lid']] = $row['name'];
}
return $fnk_result;
}
示例4: template_header_sort
function template_header_sort($paramstr, $sort, $fname, $ftitle)
{
global $p, $act, $action, $draw;
if ($act == "smadbisrept") {
OUT($ftitle);
return;
}
?>
<a href="<?php
$sort == ">{$fname}" ? $ssort = "<{$fname}" : ($ssort = ">{$fname}");
OUT("?p={$p}&act={$act}&action={$action}&draw={$draw}&{$paramstr}&sort={$ssort}");
?>
"><?php
echo $ftitle;
?>
</a>
<?php
if ($sort == "<{$fname}") {
OUT("<img src=\"" . SK_DIR . "/img/asc.gif\">");
} elseif ($sort == ">{$fname}") {
OUT("<img src=\"" . SK_DIR . "/img/desc.gif\">");
}
}
示例5: CBilling
<?php
global $_funcsPHP;
if (!isset($_funcsPHP) || $_funcsPHP != "defined") {
require_once "funcs.php";
}
$BILL = new CBilling($GV["dbhost"], $GV["dbname"], $GV["dblogin"], $GV["dbpassword"]);
$cur = $BILL->GetMonthTotalAccts();
$mon = $BILL->GetMonthMaxAccts();
$imgnum = 20.0;
$prc_tr = (double) $cur["traffic"] / (double) $mon["traffic"] * 100.0;
$perimg = 100.0 / $imgnum;
$imgnum = (int) ((double) $prc_tr / $perimg);
$decrs = array(0 => "Можно качать всё что угодно, и сколько угодно", 1 => "Можно качать всё что угодно, и сколько угодно", 2 => "Можно качать сколько угодно", 3 => "Можно качать сколько угодно", 4 => "Можно качать", 5 => "Можно качать", 6 => "Можно качать", 7 => "Можно качать", 8 => "Можно качать", 9 => "Можно, но только осторожно", 10 => "Можно, но только осторожно", 11 => "Можно, но только очень осторожно", 12 => "Только чуть полазить по сайтам", 13 => "Только почту проверить", 14 => "Можно, только по договоренности с админами", 15 => "Можно, только по договоренности с админами", 16 => "Можно, только админам", 17 => "Можно, только админам", 18 => "Можно, только админам", 19 => "НИЗЯЯ!!!");
$imgnum += 1;
if ($imgnum > 20) {
$imgnum = 20;
}
?>
<div align=center>
<img width=35 src="<?php
OUT(SK_DIR . "/billing/state_img.php");
?>
"><br>
<?php
OUT($decrs[$imgnum - 1] . "<br>(" . bytes2gb($cur["traffic"]) . " из " . bytes2gb($mon["traffic"]) . " Гб)");
?>
</div>
示例6: OUT
</table>
</td></tr>
<tr><td width=50% class=tbl1>
<table width=100% class=tbl2 style="cursor:hand;" cellspacing=0 cellpadding=0 onclick="document.location.href='./?p=smadbis&act=topofurl';">
<td height=100px width=30% align=center bgcolor=#F0F6F8><img src="<?php
OUT(SK_DIR);
?>
/img/bill_statistic.gif"></td>
<td bgcolor=#F0F6F8><div align=center><b><a href="./?p=smadbis&act=topofurl">Top посещаемых ресурсов Интернет</a></b></div><br>
</td>
</table>
</td></tr>
<tr><td width=50% class=tbl1>
<table width=100% class=tbl2 style="cursor:hand;" cellspacing=0 cellpadding=0 onclick="document.location.href='./?p=smadbis&act=stats';">
<td height=100px width=30% align=center bgcolor=#DDEEF3><img src="<?php
OUT(SK_DIR);
?>
/img/bill_statistic.gif"></td>
<td bgcolor=#DDEEF3><div align=center><b><a href="./?p=smadbis&act=stats">Ваша статистика</a></b></div><br>
</td>
</table>
</td></tr>
</table>
<?php
}
break;
case 1:
$BILL = new CBilling($GV["dbhost"], $GV["dbname"], $GV["dblogin"], $GV["dbpassword"]);
?>
<div align=center><b><font class=fontheader>Ваша статистика:</font></b></div>
<?php
示例7: OUT
<div align=center> <a href="<?php
OUT("?p={$p}&act={$act}&id={$id}");
?>
">назад</a></div>
<?php
// }
} else {
include SK_DIR . "/pager_admin.php";
}
} else {
if ($_MODULE) {
if ($id && file_exists($DIRS["pager_data"] . "/" . $id)) {
OUT(get_file($DIRS["pager_data"] . "/" . $id));
if (check_auth() && _isroot()) {
?>
<div align=center>
<a href="?p=user_page&act=root&id=pager&a=edit&pgrec=<?php
OUT($id);
?>
">Редактировать</a>
</div>
<?php
}
} else {
global $page;
$page = "404";
$this->LoadModule("error", false);
}
}
}
}
示例8: OUT
<?php
}
?>
</table><br><br>
<?php
}
if (!count($messages)) {
OUT("<div align=center>нет сообщений</div>");
}
echo "<CENTER>Страница: " . $pagestext . "</CENTER>";
if (check_auth() && $CURRENT_USER["level"] >= 5) {
?>
<div align=center>
<a href="?p=<?php
OUT($p);
?>
&a=admin">Администрирование</a>
</div>
<?php
}
}
} else {
include SK_DIR . "/guestbook.php";
}
} else {
if (!file_exists(SK_DIR . "/guestbookbar.php")) {
$ERR->Warning("Skin '" . $GV["skin"] . "' doesn't support this module!");
} else {
include SK_DIR . "/guestbookbar.php";
}
示例9: OUT
?>
<?php
if ($CURRENT_USER["level"] >= 8) {
?>
</a><?php
}
?>
<br>
<?php
if ($CURRENT_USER["level"] >= 5) {
?>
<a style="font-size:10px" href="?p=smadbis&act=online"><?php
}
?>
сейчас он-лайн: <?php
OUT(count($inlist));
?>
<?php
if ($CURRENT_USER["level"] >= 5) {
?>
</a><?php
}
?>
<?php
// }
} else {
include SK_DIR . "/userssbar.php";
}
}
}
}
示例10: OUT
</tr>
<tr>
<td width=50%>Описание тарифа </td><td width=50%><textarea name=vars[] class=inputbox style="width:100%" rows=5><?php
++$k;
OUT($vars[$k++]);
?>
</textarea></td>
</tr>
<tr>
<td width=50%>Ранг данного тарифа </td><td width=50%><input type=text class=inputbox style="width:100%" name=vars[] value="<?php
OUT($vars[$k++]);
?>
"></td>
</tr>
<tr>
<td width=50%>Максимальное дневное превышение трафика (раз) </td><td width=50%><input type=text class=inputbox style="width:100%" name=vars[] value="<?php
OUT($vars[$k++]);
?>
"></td>
</tr>
</table>
<div align=center><input type=submit name=submform class=button value="Сохранить"></div>
</form><br>
<div align=center><a href="<?php
OUT("?p={$p}&act={$act}");
?>
">назад</a></div>
<?php
}
示例11: OUT
<?php
//----------------------------------------------------------------------//
// TITLE: PHP Class for bottom //
// MAKER: SMStudio //
// specially for SMS CMS (SM & Shurup Content Management System) //
//----------------------------------------------------------------------//
$MDL_TITLE = "Bottom";
$MDL_DESCR = "For bottom";
$MDL_UNIQUEID = "bottom";
$MDL_MAKER = "SMStudio";
if (!$_GETINFO) {
global $timer;
$timer->stop();
OUT("Page generated by: " . $timer->elapsed());
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
}
示例12: mysql_query
if ($id != "NULL" && $id != "") {
$query = "DELETE FROM lessons WHERE lid={$id}";
mysql_query($query) or die(json_encode(array('error' => OUT(mysql_error()))));
echo json_encode(array('error' => "Success"));
}
} elseif (isset($_GET['m']) && $_GET['m'] == 'lesson_save') {
$id = mysql_real_escape_string(trim($_GET['id']));
$name = mysql_real_escape_string(trim($_GET['name']));
$color = mysql_real_escape_string(trim($_GET['color']));
$duration = mysql_real_escape_string(trim($_GET['duration']));
$desc = mysql_real_escape_string(trim($_GET['desc']));
if ($id != 'NULL' && $id != "") {
$query = "UPDATE lessons SET name='{$name}', duration='{$duration}', color='{$color}' WHERE lid={$id}";
mysql_query($query) or die(json_encode(array('error' => OUT(mysql_error()))));
echo json_encode(array('error' => "Success"));
} else {
echo json_encode(array('error' => "Null id"));
}
} elseif (isset($_GET['m']) && $_GET['m'] == 'create_trainer') {
$name = mysql_real_escape_string(trim($_GET['name']));
$phone = mysql_real_escape_string(trim($_GET['phone']));
$query = "INSERT INTO trainers VALUES (NULL, '{$name}', '{$phone}')";
mysql_query($query) or die(json_encode(array('error' => OUT(mysql_error()))));
echo json_encode(array('error' => "Success"));
} elseif (isset($_GET['m']) && $_GET['m'] == 'copyweek_copy') {
$weekday = mysql_real_escape_string(trim($_GET['weekday']));
$countToAdd = mysql_real_escape_string(trim($_GET['countToAdd']));
$query = "insert into training_times (`date`,`time_start`, `time_end`, `hall`,\n`trainer`, `lesson`)\nselect\nINTERVAL (7*{$countToAdd}) DAY + `date`,\n `time_start`, `time_end`, `hall`, `trainer`, `lesson`\nfrom training_times\nwhere WEEKOFYEAR(`date`) = WEEKOFYEAR('{$weekday}')";
mysql_query($query) or die(json_encode(array('error' => OUT(mysql_error()))));
echo json_encode(array('error' => "Success"));
}
示例13: get_user_data
for ($i = count($alist) - 1; $i >= 0 && $i >= count($alist) - 3; --$i) {
$data = $ANN->GetAnnData($alist[$i]);
?>
<a style="font-size:9px" href="?p=users&act=userinfo&id=<?php
$ud = get_user_data($data['login']);
OUT($ud["id"]);
?>
"><?php
OUT($ud["nick"]);
?>
</a>:<?php
OUT($data['title']);
?>
<br>
<font color=gray style="font-size:8.5px">/<?php
OUT(norm_date($data['date']));
?>
</font><br>
<?php
}
?>
<b><div align=center><a style="font-size:8.5px" href=?p=annoucements>подробнее</a></div>
<?php
} else {
include SK_DIR . "/annoucementsbar.php";
}
}
}
}
?>
示例14: log_url_protocol_template
function log_url_protocol_template($session)
{
?>
<table class=tbl1 width=100%>
<tr>
<td width=100% class=tbl1>
<div align=center><b><STRONG>Protocol:</STRONG></b></div>
<?php
OUT(nl2br($session['protocol']['data']));
?>
</td>
</tr>
<tr>
<td width=100% class=tbl1><div align=center><b>Total data recieved:
<?php
OUT(make_fsize_str($session['protocol']['length']));
?>
</b></div></td>
</tr>
</table>
<?php
}
示例15: OUT
<?php
global $MDL, $GV, $DIRS;
?>
<div align=center><b>root menu:</b></div>
<div align=center>
<a href="?act=root&id=pass">пароль</a><br>
<a href="?act=root&id=modules">модули</a><br>
<a href="?act=root&id=vars">настройки</a><br>
<?php
if ($MDL->IsModuleExists("menu")) {
?>
<a href="?act=root&id=menu">пункты меню</a><br><?php
}
if ($MDL->IsModuleExists("pager")) {
?>
<a href="?act=root&id=pager">странички</a><br><?php
}
if ($MDL->IsModuleExists("users")) {
?>
<a href="?act=root&id=users">пользователи</a><br><?php
}
?>
<br>
<a href="?act=root&id=logout&fwdto=<?php
OUT($FLTR->DirectProcessURL(getfullurl()));
?>
">logout root</a><br>
</div>