本文整理汇总了PHP中isNum函数的典型用法代码示例。如果您正苦于以下问题:PHP isNum函数的具体用法?PHP isNum怎么用?PHP isNum使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isNum函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: chkLogin2
function chkLogin2()
{
global $db;
$m_id = getCookie('adminid');
ckSql($m_id);
$m_name = getCookie('adminname');
ckSql($m_name);
$m_check = getCookie('admincheck');
ckSql($m_check);
$index = 'index.php';
if (strpos($_SERVER['PHP_SELF'], 'editor') > -1) {
$index = "../" . $index;
}
if (!isN($m_name) && !isNum($m_id)) {
$row = $db->getRow('SELECT * FROM {pre}manager WHERE m_name=\'' . mysql_real_escape_string($m_name) . '\' AND m_id= \'' . $m_id . '\' AND m_status=1');
if ($row) {
$loginValidate = md5($row['m_random'] . $row['m_name'] . $row['m_id']);
if ($m_check != $loginValidate) {
sCookie('admincheck', '');
redirect($index . '?m=admin-login', 'top.');
}
} else {
sCookie('admincheck', '');
redirect($index . '?m=admin-login', 'top.');
}
} else {
redirect($index . '?m=admin-login', 'top.');
}
}
开发者ID:klarclm,项目名称:sgv,代码行数:29,代码来源:admin_conn.php
示例2: editall
function editall()
{
global $db;
$t_id = be("arr", "t_id");
$ids = explode(",", $t_id);
foreach ($ids as $id) {
$t_name = be("post", "t_name" . $id);
$t_enname = be("post", "t_enname" . $id);
$t_sort = be("post", "t_sort" . $id);
// $t_template = be("post","t_template" .$id);
// $t_vodtemplate = be("post","t_vodtemplate" .$id);
// $t_playtemplate = be("post","t_playtemplate" .$id);
// $t_key = be("post","t_key" .$id);
// $t_des = be("post","t_des" .$id);
if (isN($t_name)) {
echo "名称不能为空";
exit;
}
if (isN($t_enname)) {
echo "别名不能为空";
exit;
}
if (!isNum($t_sort)) {
echo "排序号不能为空或不是数字";
exit;
}
// if (isN($t_template)) { $t_template = "vodlist.html";}
// if (isN($t_vodtemplate)) { $t_vodtemplate = "vod.html";}
// if (isN($t_playtemplate)) { $t_playtemplate = "vodplay.html";}
$db->Update("{pre}vod_type", array("t_name", "t_enname", "t_sort"), array($t_name, $t_enname, $t_sort), "t_id=" . $id);
}
updateCacheFile();
echo "修改完毕";
}
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:34,代码来源:admin_vod_type.php
示例3: cell
function cell($i = null, $j = null)
{
if (isNum($i)) {
return _(_($this->_('tr'))->eq($i));
} else {
return _(_($this->O)->_('tr'));
}
if (isNum($j) && isNum($i)) {
return _($this->cell($i)->eq($j));
}
}
开发者ID:hoangsoft90,项目名称:hw-sudoku-wordpress,代码行数:11,代码来源:hphp.table.php
示例4: comboBox_range
function comboBox_range($from, $to, $assign = '', $opt = 0)
{
if (isNum($from) && isNum($to) && $from <= $to) {
if (!isStr($assign)) {
$assign = '';
}
$list = createForm()->select->create(array());
for ($i = $from; $i <= $to; $i++) {
$list->add_option($i, $opt <= 0 ? $assign . $i : $i . $assign);
}
return $list;
}
}
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:13,代码来源:hphp.plugin_Element.php
示例5: sendMessage
function sendMessage($user_id, $other_user_id, $msg_text)
{
if (userExistsById($user_id) === true && userExistsById($other_user_id) === true) {
$msg_text = trim($msg_text);
if ($msg_text === "") {
return false;
}
$msg_id = insertMsg($msg_text);
if (isNum($msg_id)) {
insertUserMessage($msg_id, $user_id, $other_user_id, "Sent");
insertUserMessage($msg_id, $other_user_id, $user_id, "Inbox");
return true;
}
return false;
} else {
return false;
}
}
开发者ID:rw00,项目名称:tutorme,代码行数:18,代码来源:Messaging.php
示例6: editall
function editall()
{
global $db;
$t_id = be("arr", "t_id");
$ids = explode(",", $t_id);
foreach ($ids as $id) {
$status = be("post", "status" . $id);
$disp_order = be("post", "disp_order" . $id);
if (isN($disp_order)) {
$t_sort = $db->getOne("SELECT MAX(disp_order) FROM apk_master_items ") + 1;
}
if (!isNum($disp_order)) {
echo "信息填写不完整!";
exit;
}
$db->Update("apk_master_items", array("status", "disp_order"), array($status, $disp_order), "id=" . $id);
}
updateCacheFile();
echo "修改完毕";
}
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:20,代码来源:admin_apk_items.php
示例7: c_cell
function c_cell($d = null)
{
$o = array();
$a = optimize_args(func_get_args());
if (count($a) && ($c = isset($a[0]) ? $a[0] : false)) {
if (isNum($c)) {
unset($a[0]);
for ($i = 0; $i < $c; $i++) {
$o[] = $this->c_cell($a);
}
} else {
foreach ($a as $v) {
if (isDrw($v)) {
$o[] = $this->c_cell($v);
}
}
}
return count($o) == 1 ? $o[0] : $o;
} else {
return cEle($this->child_type)->do_method(array('class' => 'frame_cell'), $a)->O;
}
}
开发者ID:hoangsoft90,项目名称:hw-sudoku-wordpress,代码行数:22,代码来源:hphp.frame.php
示例8: updateLetvVideoUrl
function updateLetvVideoUrl($pagenum, $endPage)
{
global $db;
$sql = "SELECT count(*) FROM {pre}vod WHERE webUrls IS not NULL and webUrls != '' and d_hide =0 and d_type in (1,2,3,131) and d_status = 0 and d_playfrom like '%letv%' ";
$nums = $db->getOne($sql);
$app_pagenum = 10;
$pagecount = ceil($nums / $app_pagenum);
if (!isNum($endPage)) {
$endPage = $pagecount;
} else {
$endPage = intval($endPage);
}
// $pagecount=2;
for ($i = $pagenum; $i <= $pagecount && $i <= $endPage; $i++) {
writetofile("updateLetvVideoUrl.log", 'check item for vod type{=}' . $nums . '{=}Total{=}' . $pagecount . '{=}' . $i);
$sql = "SELECT webUrls,d_downurl, d_playfrom,d_id FROM {pre}vod WHERE webUrls IS not NULL and webUrls != '' and d_hide =0 and d_type in (1,2,3,131) and d_playfrom like '%letv%' and d_status = 0 order by d_play_num desc limit " . $app_pagenum * ($i - 1) . "," . $app_pagenum;
// var_dump($sql);
$rs = $db->query($sql);
parseVodPad($rs);
unset($rs);
//sleep(60);
}
}
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:23,代码来源:collectLetvVideoUrl.php
示例9: make
function make()
{
global $template;
$file = be("get", "file");
$fname = be("get", "fname");
$file = be("get", "file");
$template->html = file_get_contents($file);
$template->mark();
$template->vodpagelist();
$num = $template->page_count;
if (isNum($template->par_maxpage)) {
if ($num >= $template->par_maxpage) {
$num = $template->par_maxpage;
$template->page_count = intval($num);
}
}
$template->pageshow();
$template->ifEx();
$template->run("other");
$fname = replaceStr($fname, "label_", "");
$fname = replaceStr($fname, "\$\$", "/");
fwrite(fopen("../" . $fname, "wb"), $template->html);
echo " 生成完毕 <a target='_blank' href='" . "../" . $fname . "'> <font color=red>浏览</font></a><br>";
}
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:24,代码来源:admin_templates.php
示例10: main
function main()
{
global $db, $cache;
$tv_id = be("all", "tv_id");
$day = be("all", "day");
if (!isNum($tv_id)) {
$tv_id = 0;
} else {
$tv_id = intval($tv_id);
}
if (isN($day)) {
$day = date('Y-m-d', time());
}
$where = " 1=1 ";
$where .= " AND tv_id =" . $tv_id;
$where .= " AND day ='" . $day . "'";
$pagenum = be("all", "page");
if (!isNum($pagenum)) {
$pagenum = 1;
} else {
$pagenum = intval($pagenum);
}
if ($pagenum < 1) {
$pagenum = 1;
}
$sql = "SELECT count(*) FROM {pre}tv_program_item as a " . " where " . $where;
$nums = $db->getOne($sql);
$pagecount = ceil($nums / app_pagenum);
$sql1 = "SELECT * FROM {pre}tv_program_item where " . $where . " and play_time<='12:00' order by play_time asc ";
$sql2 = "SELECT * FROM {pre}tv_program_item where " . $where . " and play_time>'12:00' order by play_time asc ";
// var_dump($sql);
$rs1 = $db->query($sql1);
$rs2 = $db->query($sql2);
?>
<script language="javascript">
function filter(){
var tv_id=$("#tv_id").val();
var day =$("#date").val();
if(day ==''){
var url = "admin_program_items_day.php?tv_id="+tv_id+"&day="+day;
}else {
var url = "admin_program_items.php?tv_id="+tv_id+"&day="+day;
}
window.location.href=url;
}
function collecProgram(){
var tv_id=$("#tv_id").val();
var day =$("#date").val();
var url = "admin_program_items.php?action=collecProgram&tv_id="+tv_id+"&day="+day;
$.get(url,"", function(obj) {
alert(obj);
});
}
$(document).ready(function(){
$('#form1').form({
onSubmit:function(){
if(!$("#form1").valid()) {return false;}
},
success:function(data){
$.messager.alert('系统提示', data, 'info',function(){
location.href=location.href;
});
}
});
$("#btnDel").click(function(){
if(confirm('确定要删除吗')){
$("#form1").attr("action","admin_ajax.php?action=del&flag=batch&tab={pre}vod_topic_items");
$("#form1").submit();
}
else{return false}
});
$("#btnEdit").click(function(){
$("#form1").attr("action","?action=editall");
$("#form1").submit();
});
$("#btnAdd").click(function(){
$('#form2').form('clear');
$("#flag").val("add");
$('#win1').window('open');
});
$("#btnAdd_down").click(function(){
$('#form2').form('clear');
$("#flag").val("add");
$('#win1').window('open');
});
$('#form2').form({
onSubmit:function(){
if(!$("#form2").valid()) {return false;}
},
success:function(data){
//.........这里部分代码省略.........
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:101,代码来源:admin_program_items.php
示例11: main
function main()
{
global $db, $template, $cache;
$loginname = getCookie("adminname");
$keyword = be("all", "keyword");
$stype = be("all", "stype");
$area = be("all", "area");
$topic = be("all", "topic");
$level = be("all", "level");
$from = be("all", "from");
$sserver = be("all", "sserver");
$sstate = be("all", "sstate");
$repeat = be("all", "repeat");
$repeatlen = be("all", "repeatlen");
$order = be("all", "order");
$pagenum = be("all", "page");
$sort = be("all", "sort");
$spic = be("all", "spic");
$hide = be("all", "hide");
$d_status = be("all", "d_status");
$douban_score = be("all", "douban_score");
$ipadpic = be("all", "ipadpic");
$d_douban_id = be("all", "d_douban_id");
$can_search_device = be("all", "can_search_device");
if (!isNum($level)) {
$level = 0;
} else {
$level = intval($level);
}
if (!isNum($sstate)) {
$sstate = 0;
} else {
$sstate = intval($sstate);
}
if (!isNum($stype)) {
$stype = 0;
} else {
$stype = intval($stype);
}
if (!isNum($area)) {
$area = 0;
} else {
$area = intval($area);
}
if (!isNum($topic)) {
$topic = 0;
} else {
$topic = intval($topic);
}
if (!isNum($spic)) {
$spic = 0;
} else {
$spic = intval($spic);
}
if (!isNum($ipadpic)) {
$ipadpic = 0;
} else {
$ipadpic = intval($ipadpic);
}
if (!isNum($hide)) {
$hide = -1;
} else {
$hide = intval($hide);
}
if (!isNum($douban_score)) {
$douban_score = 0;
} else {
$douban_score = intval($douban_score);
}
if (!isNum($repeatlen)) {
$repeatlen = 0;
}
if (!isNum($d_status)) {
$d_status = -1;
} else {
$d_status = intval($d_status);
}
if (isNum($d_douban_id)) {
$d_douban_id = intval($d_douban_id);
}
if (!isNum($pagenum)) {
$pagenum = 1;
} else {
$pagenum = intval($pagenum);
}
if ($pagenum < 1) {
$pagenum = 1;
}
$where = " d_type in (1,2,3,131) ";
$keyword_col = be("all", "keyword_col");
if (!isN($keyword)) {
$keyword = trim($keyword);
if (isN($keyword_col)) {
$where .= " AND ( d_directed like '%" . $keyword . "%' or d_starring like '%" . $keyword . "%' or d_name like '%" . $keyword . "%' or d_enname like '%" . $keyword . "%' ) ";
} else {
$where .= " AND " . $keyword_col . " like '%" . $keyword . "%' ";
}
}
if ($stype > 0) {
$typearr = getValueByArray($cache[0], "t_id", $stype);
//.........这里部分代码省略.........
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:101,代码来源:admin_online_subscribe.php
示例12: author
+--------------------------------------------------------+
| Filename: embed.php
| Author: Domi & fetloser
| www.venue.nu
| Embed player functions by Wain Glaister
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../../maincore.php";
if (isset($url) && !isNum($url)) {
redirect("index.php");
}
if (!isset($p)) {
require_once THEMES . "templates/header.php";
} else {
require_once THEME . "theme.php";
echo "<link rel='stylesheet' href='" . THEME . "styles.css' type='text/css'>";
}
include INFUSIONS . "the_kroax/functions.php";
if ($kroaxsettings['kroax_set_keepalive'] == "1") {
//add_to_head("<script type='text/javascript' src=".INFUSIONS."the_kroax/onlinestatus.js'></script>");
echo "<script type='text/javascript' src='" . INFUSIONS . "the_kroax/onlinestatus.js'></script>";
echo "<body onload=\"ajax(page,'onlinestatus','" . $url . "')\"></body>";
}
function RemoveExtension($strName)
开发者ID:simplyianm,项目名称:clububer,代码行数:31,代码来源:embed.php
示例13: prp_render_cats
}
prp_render_cats($catid, $review->id, $path, $cats);
unset($path, $cats);
if (!is_null($access_group)) {
if ($prp->settings['hide_cats']) {
fallback("error.php?type=access");
}
show_info('<img src="icons/lock.png" alt="' . $locale['prp_locked'] . '" /> ' . str_replace('%s', getgroupname($access_group), $locale['PRP215']));
}
}
/***************************************************************************
* DOWNLOADS *
***************************************************************************/
if (is_null($access_group) && !$review->id && (!isset($catid) || $catid != 0)) {
$rowstart = 0;
if (isset($_GET['rowstart']) && isNum($_GET['rowstart'])) {
$rowstart = $_GET['rowstart'];
}
$downs = array();
if (isset($catid)) {
$get = array('type' => 'cat', 'data' => $catid);
} else {
$get = array('type' => 'none');
}
$count = prpCore::get_reviews($get, $prp_sorting, $rowstart, $prp->settings['per_page'], false, $downs);
$link = FUSION_SELF . "?" . (isset($catid) ? "catid={$catid}&" : "");
prp_render_downs($downs, $rowstart, $prp->settings['per_page'], $count, $link);
unset($downs);
}
if (is_null($access_group) && $review->id) {
include 'did.php';
开发者ID:simplyianm,项目名称:clububer,代码行数:31,代码来源:review.php
示例14: main
function main()
{
global $db;
$pagenum = be("get", "page");
if (isN($pagenum) || !isNum($pagenum)) {
$pagenum = 1;
}
if ($pagenum < 1) {
$pagenum = 1;
}
$pagenum = intval($pagenum);
$project = be("get", "{pre}cj_vod_projects");
$sql = "select * from {pre}cj_change where c_sys=0 ";
if ($project != "") {
$sql = $sql . " and c_pid = " . $project;
}
$rscount = $db->query($sql);
$nums = $db->num_rows($rscount);
//总记录数
$pagecount = ceil($nums / app_pagenum);
//总页数
$sql = $sql . " limit " . app_pagenum * ($pagenum - 1) . "," . app_pagenum;
$rs = $db->query($sql);
?>
<script language="javascript">
$(document).ready(function(){
$("#form2").validate({
rules:{
name:{
required:true,
maxlength:32
},
toid:{
required:true
},
pid:{
required:true
}
}
});
$("#btnDel").click(function(){
if(confirm('确定要删除吗')){
$("#form1").attr("action","collect_vod_change.php?action=del");
$("#form1").submit();
}
else{return false}
});
$("#btnEdit").click(function(){
if(confirm('确定要保存修改吗')){
$("#form1").attr("action","collect_vod_change.php?action=save");
$("#form1").submit();
}
else{return false}
});
$("#btnAdd").click(function(){
$('#form2').form('clear');
$('#win1').window('open');
});
$("#btnCancel").click(function(){
location.href = location.href ;
});
});
</script>
<table width="96%" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td>
菜单:<a href="collect_vod_manage.php?action=">采集规则列表</a> | <a href="collect_vod_manage.php?action=upexp">导入采集规则</a> | <a href="collect_vod_change.php">分类转换</a> | <a href="collect_vod_filters.php">信息过滤</a>
按项目查看:<select onchange=javascript:window.location.href=this.options[this.selectedIndex].value>
<option value="?action=">所有转换</option>
<option value="?action=&{pre}cj_vod_projects=0" <?php
if ($project == "0") {
echo "selected";
}
?>
>全局转换</option>
<?php
echo makeSelect("{pre}cj_vod_projects", "p_id", "p_name", "", "collect_vod_change.php", " | ", $project);
?>
</select>
</td>
</tr>
</table>
<form id="form1" name="form1" method="post">
<table class="tb">
<tr>
<td width="10%" >ID</td>
<td width="30%" >采集分类</td>
<td width="30%" >系统分类</td>
<td width="30%" >所属项目</td>
</tr>
<?php
if (!$rs) {
?>
<tr><td align="center" colspan="5">没有任何记录!</td></tr>
<?php
} else {
$i = 0;
while ($row = $db->fetch_array($rs)) {
//.........这里部分代码省略.........
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:101,代码来源:collect_vod_change.php
示例15: Jones
| Author: Nick Jones (Digitanium)
| Co Author: WEC
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../maincore.php";
if (!checkrights("P") || !defined("iAUTH") || !isset($_GET['aid']) || $_GET['aid'] != iAUTH) {
redirect("../index.php");
}
if (!isset($_GET['panel_side']) || !isNum($_GET['panel_side']) || $_GET['panel_side'] > 4) {
$panel_side = 1;
} else {
$panel_side = $_GET['panel_side'];
}
require_once THEMES . "templates/admin_header.php";
include LOCALE . LOCALESET . "admin/panels.php";
$temp = opendir(INFUSIONS);
while ($folder = readdir($temp)) {
if (!in_array($folder, array(".", "..")) && strstr($folder, "_panel")) {
if (is_dir(INFUSIONS . $folder)) {
$panel_list[] = $folder;
}
}
}
closedir($temp);
开发者ID:necrophcodr,项目名称:Muks,代码行数:31,代码来源:panel_editor.php
示例16: die
if (!defined("IN_FUSION")) {
die("Access Denied");
}
$result = dbquery("SELECT * FROM " . DB_PREFIX . "formulars");
$that = dbarray($result);
/* --------------------------------- CONFIG ------------------------------------------- */
$forum_id = $that['pr_forumid'];
// This is the ID of the boardcategorie where the thread should be posted
$poster_id = $userdata['user_id'];
// The member with this ID is the poster of the thread
$board_type = $that['pr_forumtype'];
// 0=Standard || 1=Fusionboard // Which Forum you use
/* --------------------------------- CONFIG END --------------------------------------- */
/* --------------------------------- DO NOT CHANGE SOMETHING UNDER THESE LINE --------- */
if (isset($_GET['id'])) {
if (!isNum($_GET['id'])) {
die("Access denied");
}
$result = dbquery("SELECT * FROM " . DB_PREFIX . "bewerbung WHERE pr_id='" . $_GET['id'] . "'");
$erg = dbarray($result);
$thread_titel = "Bewerbung von " . $erg['pr_bname'];
$nachricht = "Wir haben eine neue Bewerbung: \n";
$result = dbquery("SELECT * FROM " . DB_PREFIX . "form_fields WHERE pr_toform = '1'");
while ($data = dbarray($result)) {
$value_norm = $erg['pr_' . $data['pr_name']];
$value = htmlspecialchars($value_norm, ENT_QUOTES);
$value = preg_replace("/'/", "", $value);
$nachricht .= "\n" . $data['pr_desc'] . ": " . $value . " ";
}
/* This Code based on a Code from ghost2k from a post on the board of the German supportsite */
if ($board_type == "1") {
开发者ID:MichaelFichtner,项目名称:RadioLaFamilia,代码行数:31,代码来源:forum_post.inc.php
示例17: str_replace
$tpl->H = str_replace("{maccms:count_gbook_all}", $tpl->getDataCount('gbook', "all"), $tpl->H);
}
if (strpos($tpl->H, '{maccms:count_gbook_day}')) {
$tpl->H = str_replace("{maccms:count_gbook_day}", $tpl->getDataCount('gbook', "day"), $tpl->H);
}
$tpl->pageshow();
} elseif ($method == 'save') {
$g_vid = be("all", "g_vid");
$g_vid = chkSql($g_vid);
$g_name = be("all", "g_name");
$g_name = chkSql($g_name);
$g_content = be("all", "g_content");
$g_content = chkSql($g_content);
$g_code = be("all", "g_code");
$g_code = chkSql($g_code);
if (!isNum($g_vid)) {
$g_vid = 0;
}
if (isN($g_name) || isN($g_content)) {
alert('请输入昵称和内容');
exit;
}
if ($MAC['other']['gbookverify'] == 1 && $_SESSION["code_gbook"] != $g_code) {
alert('验证码错误');
exit;
}
if (getTimeSpan("last_gbooktime") < $MAC['other']['gbooktime']) {
alert('请不要频繁操作');
exit;
}
$pattern = '/[^\\x00-\\x80]/';
开发者ID:klarclm,项目名称:sgv,代码行数:31,代码来源:gbook.php
示例18: main
function main()
{
global $db, $cache;
$topic_id = be("all", "topic_id");
$flag = be("all", "flag");
if (!isNum($topic_id)) {
$topic_id = 0;
} else {
$topic_id = intval($topic_id);
}
if (!isNum($flag)) {
$flag = -1;
} else {
$flag = intval($flag);
}
$where = " 1=1 ";
$where .= " AND a.topic_id =" . $topic_id;
if ($flag == 1) {
$where .= " AND a.flag =1 ";
}
if ($flag == 0) {
$where .= " AND a.flag =0 ";
}
$pagenum = be("all", "page");
if (!isNum($pagenum)) {
$pagenum = 1;
} else {
$pagenum = intval($pagenum);
}
if ($pagenum < 1) {
$pagenum = 1;
}
$sql = "SELECT count(*) FROM {pre}vod_topic_items as a " . " where " . $where;
$nums = $db->getOne($sql);
$pagecount = ceil($nums / app_pagenum);
//$sql = "SELECT a.id as id, a.flag as flag, a.disp_order as disp_order, vod.d_name as vod_name,vod.d_id as vod_id FROM {pre}vod_topic_items a,{pre}vod vod where ".$where." and a.vod_id=vod.d_id ORDER BY a.disp_order,a.id ASC limit ".(app_pagenum * ($pagenum-1)) .",".app_pagenum;
// var_dump($sql);
$sql = "SELECT a.id as id, a.flag as flag, a.disp_order as disp_order, vod.d_name as vod_name,vod.d_id as vod_id FROM {pre}vod_topic_items AS a LEFT JOIN {pre}vod AS vod ON a.vod_id = vod.d_id WHERE " . $where . " and a.topic_id ={$topic_id} ORDER BY a.disp_order,a.id ASC LIMIT " . app_pagenum * ($pagenum - 1) . "," . app_pagenum;
$rs = $db->query($sql);
?>
<script language="javascript">
function filter(){
var topic_id=$("#topic_id").val();
var st_flag =$("#st_flag").val();
var url = "admin_vod_topic_items.php?topic_id="+topic_id+"&flag="+st_flag;
window.location.href=url;
}
$(document).ready(function(){
$('#form1').form({
onSubmit:function(){
if(!$("#form1").valid()) {return false;}
},
success:function(data){
$.messager.alert('系统提示', data, 'info',function(){
location.href=location.href;
});
}
});
$("#btnDel").click(function(){
if(confirm('确定要删除吗')){
$("#form1").attr("action","admin_ajax.php?action=del&flag=batch&tab={pre}vod_topic_items");
$("#form1").submit();
}
else{return false}
});
$("#btnEdit").click(function(){
$("#form1").attr("action","?action=editall");
$("#form1").submit();
});
// $("#btnAdd").click(function(){
// window.location.href="admin_vod.php?topic_id=<?php
echo $topic_id;
?>
";
// });
$("#btnCancel").click(function(){
location.href= location.href;
});
});
function edit(id)
{
$('#form2').form('clear');
$("#flag").val("edit");
$('#win1').window('open');
$('#form2').form('load','admin_ajax.php?action=getinfo&tab={pre}vod_topic&col=t_id&val='+id);
}
</script>
<table class="admin_vod_topic_items tb">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1">
<tr>
<td colspan="2">
过滤条件:视频榜单 <select id="topic_id" name="topic_id" >
<?php
//.........这里部分代码省略.........
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:101,代码来源:admin_vod_topic_items.php
示例19: tblbreak
echo "<option value='{$maya_fey}'>{$maya_fey}</option>";
}
echo "</select>";
} else {
echo "<b>This option is only available while editing an already created species.</b>";
}
echo "</td>\n\n</tr><tr>\n\n<td width='50%' align='right'><b>Pet Species Name:</b></td>\n\n<td width='50%' align='left'>\n<input type='text' name='name' value='{$name}' class='textbox' style='width:120px;' />\n</td>\n\n</tr><tr>\n\n<td width='50%' align='right'><b>\nPet Info:\n</b></td>\n\n<td width='50%' align='left'>\n<textarea rows='2' cols='20' name='info'>{$info}</textarea>\n</td>\n\n</tr><tr>\n\n<td colspan='2' align='center'>\n<input type='submit' name='save_cat' value='Save Pet' class='button'>\n</td></tr>\n</table>\n</form>\n\n</center>";
tblbreak();
echo "<table align='center' width='55%' cellspacing='0'>\n<td class='tbl2' width='30%'><b>" . $locale['VARC351'] . "</b></td>\n<td class='tbl2' align='right' width='10%'><b>" . $locale['VARC352'] . "</b></td>\n</tr>\n";
if (!isset($sortby) || !preg_match("/^[0-9A-Z]\$/", $sortby)) {
$sortby = "all";
}
$orderby = $sortby == "all" ? "" : " WHERE name LIKE '{$sortby}%'";
$result = dbquery("SELECT * FROM " . DB_UBERPETS_PET_SPECIES . "" . $orderby . "");
$rows = dbrows($result);
if (!isset($rowstart) || !isNum($rowstart)) {
$rowstart = 0;
}
if ($rows != 0) {
$result = dbquery("SELECT * FROM " . DB_UBERPETS_PET_SPECIES . "" . $orderby . " ORDER BY name ASC, name LIMIT {$rowstart},25");
echo "<br><img src='" . PETS . ($folder != '' ? $folder : "") . "/Normal.gif' name='folder_preview' alt=''>";
while ($data = dbarray($result)) {
echo "<table align='center' width='55%' cellspacing='0'>";
echo "<tr><td class='small' width='30%'><img src='" . THEME . "images/bullet.gif' alt=''> <a href='admin.php?a_page=pet_species&step=edit&species_id=" . $data['sid'] . "'><b>" . $data['name'] . "</b></a></td>\n";
echo "<td class='small' align='right' width='30%'><a href='admin.php?a_page=pet_species&step=delete&species_id=" . $data['sid'] . "'>Delete</a></td></tr>";
echo "</table>\n";
}
echo "<div align='center' style='margin-top:5px;'>" . makePageNav($rowstart, 25, $rows, 3, "{$FUSION_SELF}?a_page=pet_species&sortby={$sortby}&") . "\n</div>\n";
} else {
echo "<center><br>" . $locale['VARC354'] . " <b>{$sortby}<b><br></center>\n";
}
开发者ID:simplyianm,项目名称:clububer,代码行数:31,代码来源:pet_species.php
示例20: author
| URL: http://www.prugnator.de
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../../../maincore.php";
require_once THEMES . "templates/admin_header.php";
if (!iADMIN || !defined("iAUTH") || $_GET['aid'] != iAUTH) {
die("Access denied");
}
if (!isset($_GET['id']) || !isNum($_GET['id'])) {
die("Access denied");
}
$result = dbquery("UPDATE " . $db_prefix . "users SET user_lastvisit='" . time() . "', user_ip='" . USER_IP . "' WHERE user_id='" . $userdata['user_id'] . "'");
$comment = dbarray($result);
opentable("Kommentar bearbeiten");
if (isset($_POST['send'])) {
$res_save = dbquery("UPDATE " . DB_PREFIX . "bewerbung SET pr_comment='" . $_POST['comment'] . "' WHERE pr_id='" . $_GET['id'] . "'");
if ($res_save) {
echo "Kommentar erfolgreich gespeichert!";
} else {
echo "Speichern ist fehlgeschlagen!";
}
} else {
$result = dbquery("SELECT pr_comment FROM " . DB_PREFIX . "bewerbung WHERE pr_id='" . $_GET['id'] . "' LIMIT 1");
$erg = dbarray($result);
开发者ID:MichaelFichtner,项目名称:RadioLaFamilia,代码行数:31,代码来源:comment.php
注:本文中的isNum函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论