date() public static method

public static date ( $name, $value = '', $attributes = [] )
Example #1
0
?>
</td>
	</tr>
	<tr id="time_end" style="<?php 
if ($data['setting']['enabletime'] == 0) {
    ?>
display:none;<?php 
}
?>
">
		<th><strong><?php 
echo L('end_time');
?>
:</strong></th>
		<td><?php 
echo form::date('setting[endtime]', $data['setting']['endtime'] ? date('Y-m-d', $data['setting']['endtime']) : 0);
?>
</td>
	</tr>
	<tr>
		<th><strong><?php 
echo L('allowed_send_mail');
?>
:</strong></th>
		<td><input name="setting[sendmail]" type="radio" value="1" <?php 
if ($data['setting']['sendmail']) {
    ?>
checked<?php 
}
?>
>&nbsp;<?php 
Example #2
0
?>
" size="25"> <div class="bk10"></div>
<span id="catids"></span>&nbsp;&nbsp; 
				<?php 
echo L('input_time');
?>
:
				<?php 
$start_f = $_GET['start_time'] ? $_GET['start_time'] : format::date(SYS_TIME - 2592000);
$end_f = $_GET['end_time'] ? $_GET['end_time'] : format::date(SYS_TIME + 86400);
?>
				<?php 
echo form::date('start_time');
?>
 - <?php 
echo form::date('end_time');
?>
				 <input type="submit" name="search" class="button" value="<?php 
echo L('search');
?>
" />
	</div>
		</td>
		</tr>
    </tbody>
</table>
</form>
</div>
<div class="table-list">
<form name="myform" id="myform" action="?m=special&c=special&a=import&specialid=<?php 
echo $_GET['specialid'];
Example #3
0
" name="pc_hash">
<table width="100%" cellspacing="0" class="search-form">
    <tbody>
		<tr>
		<td>
		<div class="explain-col">
 
				<?php 
echo L('addtime');
?>
:
				<?php 
echo form::date('start_time', $_GET['start_time'], 0, 0, 'false');
?>
- &nbsp;<?php 
echo form::date('end_time', $_GET['end_time'], 0, 0, 'false');
?>
				
				<select name="posids"><option value='' <?php 
if ($_GET['posids'] == '') {
    echo 'selected';
}
?>
><?php 
echo L('all');
?>
</option>
				<option value="1" <?php 
if ($_GET['posids'] == 1) {
    echo 'selected';
}
Example #4
0
    <tbody>
		<tr>
		<td><div class="explain-col"> <?php 
echo L('video_title');
?>
  <input type="text" value="<?php 
echo $title;
?>
" class="input-text" name="name">  <?php 
echo L('upload_time');
?>
 <?php 
echo form::date('starttime', $_GET['starttime']);
?>
- <?php 
echo form::date('endtime', $_GET['endtime']);
?>
 <label title="<?php 
echo L('site_upload');
?>
"><?php 
echo L('original');
?>
 <input type="checkbox" name="userupload" value="1" id="userupload"<?php 
if ($userupload) {
    ?>
 checked<?php 
}
?>
></label> 每页显示数:<select name="pagesize" id="pagesize"><option value="8"<?php 
if ($pagesize == 8) {
Example #5
0
echo L('title');
?>
:<input type="text" name="title" size="20"></span>
				<?php 
echo L('input_time');
?>
:
				<?php 
$start_f = $_GET['start_time'] ? $_GET['start_time'] : format::date(SYS_TIME - 2592000);
$end_f = $_GET['end_time'] ? $_GET['end_time'] : format::date(SYS_TIME + 86400);
?>
				<?php 
echo form::date('start_time', $start_f, 1);
?>
 - <?php 
echo form::date('end_time', $end_f, 1);
?>
				 <input type="submit" name="search" class="button" value="<?php 
echo L('search');
?>
" />
	</div>
		</td>
		</tr>
    </tbody>
</table>
</form>
</div>
<div class="table-list">
    <table width="100%">
        <thead>
Example #6
0
	<h2 class="title-1 line-x f14 fb blue lh28"><?php 
echo L('member_manage');
?>
</h2>
	<div class="content-menu ib-a blue line-x">
    <div class="rt">
			<form action="index.php" method="get" name="form_member_search">
				<?php 
echo L('regtime');
?>
£º
				<?php 
echo form::date('start_time', $start_time);
?>
				<?php 
echo form::date('end_time', $end_time);
?>
				<select name="type">
					<option value='1' <?php 
if (isset($_GET['type']) && $_GET['type'] == 1) {
    ?>
selected<?php 
}
?>
><?php 
echo L('username');
?>
</option>
					<option value='2' <?php 
if (isset($_GET['type']) && $_GET['type'] == 2) {
    ?>
<td><?php 
echo L('posid_thumb');
?>
</td> 
<td><?php 
echo form::images('info[thumb]', 'thumb', $thumb, 'content');
?>
 </td>
</tr>
<tr>
<td><?php 
echo L('posid_inputtime');
?>
</td> 
<td><?php 
echo form::date('info[inputtime]', date('Y-m-d h:i:s', $inputtime), 1);
?>
</td>
</tr>

<tr>
<td><?php 
echo L('posid_desc');
?>
</td> 
<td>
<textarea name="info[description]" rows="2" cols="20" id="description" class="inputtext" style="height:100px;width:300px;"><?php 
echo $description;
?>
</textarea>
</td>
Example #8
0
echo form::select($trade_status, $status, 'name="search[status]"', L('all'));
?>
      <?php 
echo L('username');
?>
:  <input type="text" value="" class="input-text" name="search[username]">  <?php 
echo L('time');
?>
:  <?php 
echo form::date('search[start_time]', '', '');
?>
 <?php 
echo L('to');
?>
   <?php 
echo form::date('search[end_time]', '', '');
?>
    <input type="submit" value="<?php 
echo L('search');
?>
" class="button" name="dosubmit">
		</div>
		</td>
		</tr>
    </tbody>
</table>
</form>
<form name="myform" action="?m=message&c=message&a=delete" method="post" onsubmit="checkuid();return false;">
<div class="table-list">
<table width="100%" cellspacing="0">
	<thead>
Example #9
0
 /**
  * edit member
  */
 function edit()
 {
     if (isset($_POST['dosubmit'])) {
         $memberinfo = $info = array();
         $basicinfo['userid'] = $_POST['info']['userid'];
         $basicinfo['username'] = $_POST['info']['username'];
         $basicinfo['nickname'] = $_POST['info']['nickname'];
         $basicinfo['email'] = $_POST['info']['email'];
         $basicinfo['point'] = $_POST['info']['point'];
         $basicinfo['password'] = $_POST['info']['password'];
         $basicinfo['groupid'] = $_POST['info']['groupid'];
         $basicinfo['modelid'] = $_POST['info']['modelid'];
         $basicinfo['vip'] = $_POST['info']['vip'];
         $basicinfo['overduedate'] = strtotime($_POST['info']['overduedate']);
         //会员基本信息
         $info = $this->_checkuserinfo($basicinfo, 1);
         //会员模型信息
         $modelinfo = array_diff($_POST['info'], $info);
         //过滤vip过期时间
         unset($modelinfo['overduedate']);
         unset($modelinfo['pwdconfirm']);
         $userid = $info['userid'];
         //如果是超级管理员角色,显示所有用户,否则显示当前站点用户
         if ($_SESSION['roleid'] == 1) {
             $where = array('userid' => $userid);
         } else {
             $siteid = get_siteid();
             $where = array('userid' => $userid, 'siteid' => $siteid);
         }
         $userinfo = $this->db->get_one($where);
         if (empty($userinfo)) {
             showmessage(L('user_not_exist') . L('or') . L('no_permission'), HTTP_REFERER);
         }
         //删除用户头像
         if (!empty($_POST['delavatar'])) {
             $this->client->ps_deleteavatar($userinfo['phpssouid']);
         }
         $status = $this->client->ps_member_edit($info['username'], $info['email'], '', $info['password'], $userinfo['phpssouid'], $userinfo['encrypt']);
         if ($status >= 0) {
             unset($info['userid']);
             unset($info['username']);
             //如果密码不为空,修改用户密码。
             if (isset($info['password']) && !empty($info['password'])) {
                 $info['password'] = password($info['password'], $userinfo['encrypt']);
             } else {
                 unset($info['password']);
             }
             $this->db->update($info, array('userid' => $userid));
             require_once CACHE_MODEL_PATH . 'member_input.class.php';
             require_once CACHE_MODEL_PATH . 'member_update.class.php';
             $member_input = new member_input($basicinfo['modelid']);
             $modelinfo = $member_input->get($modelinfo);
             //更新模型表,方法更新了$this->table
             $this->db->set_model($info['modelid']);
             $userinfo = $this->db->get_one(array('userid' => $userid));
             if ($userinfo) {
                 $this->db->update($modelinfo, array('userid' => $userid));
             } else {
                 $modelinfo['userid'] = $userid;
                 $this->db->insert($modelinfo);
             }
             showmessage(L('operation_success'), '?m=member&c=member&a=manage', '', 'edit');
         } else {
             showmessage(L('operation_failure'), HTTP_REFERER);
         }
     } else {
         $show_header = $show_scroll = true;
         $siteid = get_siteid();
         $userid = isset($_GET['userid']) ? $_GET['userid'] : showmessage(L('illegal_parameters'), HTTP_REFERER);
         //会员组缓存
         $group_cache = getcache('grouplist', 'member');
         foreach ($group_cache as $_key => $_value) {
             $grouplist[$_key] = $_value['name'];
         }
         //会员模型缓存
         $member_model_cache = getcache('member_model', 'commons');
         foreach ($member_model_cache as $_key => $_value) {
             if ($siteid == $_value['siteid']) {
                 $modellist[$_key] = $_value['name'];
             }
         }
         //如果是超级管理员角色,显示所有用户,否则显示当前站点用户
         if ($_SESSION['roleid'] == 1) {
             $where = array('userid' => $userid);
         } else {
             $where = array('userid' => $userid, 'siteid' => $siteid);
         }
         $memberinfo = $this->db->get_one($where);
         if (empty($memberinfo)) {
             showmessage(L('user_not_exist') . L('or') . L('no_permission'), HTTP_REFERER);
         }
         $memberinfo['avatar'] = get_memberavatar($memberinfo['phpssouid'], '', 90);
         $modelid = isset($_GET['modelid']) ? $_GET['modelid'] : $memberinfo['modelid'];
         //获取会员模型表单
         require CACHE_MODEL_PATH . 'member_form.class.php';
         $member_form = new member_form($modelid);
         $form_overdudate = form::date('info[overduedate]', date('Y-m-d H:i:s', $memberinfo['overduedate']), 1);
         $this->db->set_model($modelid);
         $membermodelinfo = $this->db->get_one(array('userid' => $userid));
         $forminfos = $forminfos_arr = $member_form->get($membermodelinfo);
         //万能字段过滤
         foreach ($forminfos as $field => $info) {
             if ($info['isomnipotent']) {
                 unset($forminfos[$field]);
             } else {
                 if ($info['formtype'] == 'omnipotent') {
                     foreach ($forminfos_arr as $_fm => $_fm_value) {
                         if ($_fm_value['isomnipotent']) {
                             $info['form'] = str_replace('{' . $_fm . '}', $_fm_value['form'], $info['form']);
                         }
                     }
                     $forminfos[$field]['form'] = $info['form'];
                 }
             }
         }
         $show_dialog = 1;
         include $this->admin_tpl('member_edit');
     }
 }
Example #10
0
	</tr>
	<tr>
		<th><strong><?php echo L('introduction')?>:</strong></th>
		<td><textarea name="info[description]" id="description" rows="6" cols="50"></textarea></td>
	</tr>
	<tr>
		<th><strong><?php echo L('time_limit')?>:</strong></th>
		<td><input type="radio" name="setting[enabletime]" value="1"> <?php echo L('enable')?> <input type="radio" name="setting[enabletime]" value="0" checked> <?php echo L('unenable')?></td>
	</tr>
	<tr id="time_start" style="display:none;">
  		<th><strong><?php echo L('start_time')?>:</strong></th>
        <td><?php echo form::date('setting[starttime]', date('Y-m-d', SYS_TIME))?></td>
	</tr>
	<tr id="time_end" style="display:none;">
		<th><strong><?php echo L('end_time')?>:</strong></th>
		<td><?php echo form::date('setting[endtime]')?></td>
	</tr>
	<tr>
		<th><strong><?php echo L('allowed_send_mail')?>:</strong></th>
		<td><input name="setting[sendmail]" type="radio" value="1" >&nbsp;<?php echo L('yes')?>&nbsp;&nbsp;<input name="setting[sendmail]" type="radio" value="0" checked>&nbsp;<?php echo L('no')?></td>
	</tr>
	<tr id="mailaddress" style="display:none;">
		<th><strong><?php echo L('e-mail_address')?>:</strong></th>
		<td><input type="text" name="setting[mails]" id="mails" class="input-text" size="50"> <?php echo L('multiple_with_commas')?></td>
	</tr>
	<tr>
		<th><strong><?php echo L('allows_more_ip')?>:</strong></th>
		<td><input type='radio' name='setting[allowmultisubmit]' value='1' <?php if($this->M['allowmultisubmit'] == 1) {?>checked<?php }?>> <?php echo L('yes')?>&nbsp;&nbsp;&nbsp;&nbsp;
	  <input type='radio' name='setting[allowmultisubmit]' value='0' <?php if($this->M['allowmultisubmit'] == 0) {?>checked<?php }?>> <?php echo L('no')?></td>
	</tr>
	<tr>
Example #11
0
	/**
	 * 创建配置表单字段
	 * @param array $data
	 */
	private function creatfield($data) {
		extract($data);
		$fielda_array = array('text','radio','checkbox','select','datetime','textarea');
		if(in_array($fieldtype, $fielda_array)) {
			if($fieldtype == 'text') {
				return '<input type="text" name="info['.$fieldname.']" id="'.$fieldname.'" value="'.$value.'" class="input-text" '.$formattribute.' > '.' '.$description;
			} elseif($fieldtype == 'checkbox') {
				return form::checkbox(string2array($setting),$value,"name='info[$fieldname]' $formattribute",'',$fieldname).' '.$description;
			} elseif($fieldtype == 'radio') {
				return form::radio(string2array($setting),$value,"name='info[$fieldname]' $formattribute",'',$fieldname).' '.$description;
			}  elseif($fieldtype == 'select') {
				return form::select(string2array($setting),$value,"name='info[$fieldname]' $formattribute",'',$fieldname).' '.$description;
			} elseif($fieldtype == 'datetime') {
				return form::date("info[$fieldname]",$value,$isdatetime,1).' '.$description;
			} elseif($fieldtype == 'textarea') {
				return '<textarea name="info['.$fieldname.']" id="'.$fieldname.'" '.$formattribute.'>'.$value.'</textarea>'.' '.$description;
			}
		}
	}
Example #12
0
  		<th><strong><?php 
echo L('start_time');
?>
:</strong></th>
        <td><?php 
echo form::date('setting[starttime]', date('Y-m-d', SYS_TIME));
?>
</td>
	</tr>
	<tr id="time_end" style="display:none;">
		<th><strong><?php 
echo L('end_time');
?>
:</strong></th>
		<td><?php 
echo form::date('setting[endtime]');
?>
</td>
	</tr>
	<tr>
		<th><strong><?php 
echo L('allowed_send_mail');
?>
:</strong></th>
		<td><input name="setting[sendmail]" type="radio" value="1" >&nbsp;<?php 
echo L('yes');
?>
&nbsp;&nbsp;<input name="setting[sendmail]" type="radio" value="0" checked>&nbsp;<?php 
echo L('no');
?>
</td>
Example #13
0
?>
</h6>
	 <input type="text" name="data[author]" value="" size="30"> 
	<h6> <?php 
echo L('islink');
?>
</h6>
	 <input type="text" name="linkurl" id="linkurl" value="" size="30" maxlength="255" disabled> <input name="info[islink]" type="checkbox" id="islink" value="1" onclick="ruselinkurl();" > <font color="red"><?php 
echo L('islink');
?>
</font> 
	<h6> <?php 
echo L('inputtime');
?>
</h6> <?php 
echo form::date('info[inputtime]', format::date(SYS_TIME, 1), 1);
?>
	<h6> <?php 
echo L('template_style');
?>
</h6> <?php 
echo form::select($template_list, $style, 'name="data[style]" id="style" onchange="load_file_list(this.value)"', L('please_select'));
?>
	<h6> <?php 
echo L('show_template');
?>
</h6> <span id="show_template"><script type="text/javascript">$.getJSON('?m=admin&c=category&a=public_tpl_file_list&style=<?php 
echo $style;
?>
&module=special&templates=show&id=<?php 
echo $show_template;
Example #14
0
?>
<div class="pad-10">
<form method="post" action="?m=announce&c=admin_announce&a=edit&aid=<?php echo $_GET['aid']?>" name="myform" id="myform">
<table class="table_form" width="100%">
<tbody>
	<tr>
		<th width="80"><?php echo L('announce_title')?></th>
		<td><input name="announce[title]" id="title" value="<?php echo new_html_special_chars($an_info['title'])?>" class="input-text" type="text" size="50" ></td>
	</tr>
	<tr>
		<th><?php echo L('startdate')?>:</th>
		<td><?php echo form::date('announce[starttime]', $an_info['starttime'], 1)?></td>
	</tr>
	<tr>
		<th><?php echo L('enddate')?>:</th>
		<td><?php $an_info['endtime'] = $an_info['endtime']=='0000-00-00' ? '' : $an_info['endtime']; echo form::date('announce[endtime]', $an_info['endtime'], 1);?></td>
	</tr>
	<tr>
		<th><?php echo L('announce_content')?></th>
		<td >
		<textarea name="announce[content]" id="content"><?php echo $an_info['content']?></textarea>
		<?php echo form::editor('content','basic');?>
		</td>
	</tr>
	<tr>
  		<th><strong><?php echo L('available_style')?>:</strong></th>
        <td><?php echo form::select($template_list, $an_info['style'], 'name="announce[style]" id="style" onchange="load_file_list(this.value)"', L('please_select'))?></td>
	</tr>
	<tr>
		<th><?php echo L('template_select')?>:</th>
		<td  id="show_template"><?php if ($an_info['style']) echo '<script type="text/javascript">$.getJSON(\'?m=zl_admin&c=category&a=public_tpl_file_list&style='.$an_info['style'].'&id='.$an_info['show_template'].'&module=announce&templates=show&name=announce&pc_hash=\'+pc_hash, function(data){$(\'#show_template\').html(data.show_template);});</script>'?></td>
Example #15
0
<tr>
<td width="120"><?php 
echo L('mobile');
?>
</td> 
<td><textarea name="mobile" style="width:200px; height:100px" id="mobile"></textarea></td>
</tr>
<tr>
<tr>
<td width="120"><?php 
echo L('sendtime');
?>
</td> 
<td>
<?php 
echo form::date('sendtime', date('Y-m-d H:i:s', SYS_TIME), 1);
?>
</td>
</tr>
</table>

<div class="btn text-l">
	<input name="dosubmit" type="submit" value="<?php 
echo L('submit');
?>
" class="button" id="dosubmit" onclick="check();return true;">
	<?php 
echo L('sms_remind');
?>
</div>
<div class="bk15"></div>
Example #16
0
<?php 
echo L('username');
?>
  <input type="text" value="<?php 
echo $username;
?>
" class="input-text" name="info[username]"> 
<?php 
echo L('addtime');
?>
  <?php 
echo form::date('info[start_addtime]', $start_addtime);
echo L('to');
?>
   <?php 
echo form::date('info[end_addtime]', $end_addtime);
?>
 
<?php 
echo form::select($trade_status, $status, 'name="info[status]"', L('all_status'));
?>
  
<input type="submit" value="<?php 
echo L('search');
?>
" class="button" name="dosubmit">
</div>
</form>
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
Example #17
0
 function datetime($field, $value, $fieldinfo)
 {
     extract(string2array($fieldinfo['setting']));
     $isdatetime = 0;
     $timesystem = 0;
     if ($fieldtype == 'int') {
         if (!$value) {
             $value = SYS_TIME;
         }
         $format_txt = $format == 'm-d' ? 'm-d' : $format;
         if ($format == 'Y-m-d Ah:i:s') {
             $format_txt = 'Y-m-d h:i:s';
         }
         $value = date($format_txt, $value);
         $isdatetime = strlen($format) > 6 ? 1 : 0;
         if ($format == 'Y-m-d Ah:i:s') {
             $timesystem = 0;
         } else {
             $timesystem = 1;
         }
     } elseif ($fieldtype == 'datetime') {
         $isdatetime = 1;
         $timesystem = 1;
     } elseif ($fieldtype == 'datetime_a') {
         $isdatetime = 1;
         $timesystem = 0;
     }
     return form::date("info[{$field}]", $value, $isdatetime, 1, 'true', $timesystem);
 }
Example #18
0
File: search.php Project: cfhb/MIS
 /**
  * 按照模型搜索
  */
 public function init()
 {
     $grouplist = getcache('grouplist', 'member');
     $_groupid = param::get_cookie('_groupid');
     if (!$_groupid) {
         $_groupid = 8;
     }
     if (!$grouplist[$_groupid]['allowsearch']) {
         if ($_groupid == 8) {
             showmessage(L('guest_not_allowsearch'));
         } else {
             showmessage('');
         }
     }
     if (!isset($_GET['catid'])) {
         showmessage(L('missing_part_parameters'));
     }
     $catid = intval($_GET['catid']);
     $siteids = getcache('category_content', 'commons');
     $siteid = $siteids[$catid];
     $this->categorys = getcache('category_content_' . $siteid, 'commons');
     if (!isset($this->categorys[$catid])) {
         showmessage(L('missing_part_parameters'));
     }
     if (isset($_GET['info']['catid']) && $_GET['info']['catid']) {
         $catid = intval($_GET['info']['catid']);
     } else {
         $_GET['info']['catid'] = 0;
     }
     $modelid = $this->categorys[$catid]['modelid'];
     $modelid = intval($modelid);
     if (!$modelid) {
         showmessage(L('illegal_parameters'));
     }
     //搜索间隔
     $minrefreshtime = getcache('common', 'commons');
     $minrefreshtime = intval($minrefreshtime['minrefreshtime']);
     $minrefreshtime = $minrefreshtime ? $minrefreshtime : 5;
     if (param::get_cookie('search_cookie') && param::get_cookie('search_cookie') > SYS_TIME - 2) {
         showmessage(L('search_minrefreshtime', array('min' => $minrefreshtime)), 'index.php?m=content&c=search&catid=' . $catid, $minrefreshtime * 1280);
     } else {
         param::set_cookie('search_cookie', SYS_TIME + 2);
     }
     //搜索间隔
     $CATEGORYS = $this->categorys;
     //产生表单
     pc_base::load_sys_class('form', '', 0);
     $fields = getcache('model_field_' . $modelid, 'model');
     $forminfos = array();
     foreach ($fields as $field => $r) {
         if ($r['issearch']) {
             if ($r['formtype'] == 'catid') {
                 $r['form'] = form::select_category('', $_GET['info']['catid'], 'name="info[catid]"', L('please_select_category'), $modelid, 0, 1);
             } elseif ($r['formtype'] == 'number') {
                 $r['form'] = "<input type='text' name='{$field}_start' id='{$field}_start' value='' size=5 class='input-text'/> - <input type='text' name='{$field}_end' id='{$field}_start' value='' size=5 class='input-text'/>";
             } elseif ($r['formtype'] == 'datetime') {
                 $r['form'] = form::date("info[{$field}]");
             } elseif ($r['formtype'] == 'box') {
                 $options = explode("\n", $r['options']);
                 foreach ($options as $_k) {
                     $v = explode("|", $_k);
                     $option[$v[1]] = $v[0];
                 }
                 switch ($r['boxtype']) {
                     case 'radio':
                         $string = form::radio($option, $value, "name='info[{$field}]' id='{$field}'");
                         break;
                     case 'checkbox':
                         $string = form::radio($option, $value, "name='info[{$field}]' id='{$field}'");
                         break;
                     case 'select':
                         $string = form::select($option, $value, "name='info[{$field}]' id='{$field}'");
                         break;
                     case 'multiple':
                         $string = form::select($option, $value, "name='info[{$field}]' id='{$field}'");
                         break;
                 }
                 $r['form'] = $string;
             } elseif ($r['formtype'] == 'typeid') {
                 $types = getcache('type_content', 'commons');
                 $types_array = array(L('no_limit'));
                 foreach ($types as $_k => $_v) {
                     if ($modelid == $_v['modelid']) {
                         $types_array[$_k] = $_v['name'];
                     }
                 }
                 $r['form'] = form::select($types_array, 0, "name='info[{$field}]' id='{$field}'");
             } elseif ($r['formtype'] == 'linkage') {
                 $setting = string2array($r['setting']);
                 $value = $_GET['info'][$field];
                 $r['form'] = menu_linkage($setting['linkageid'], $field, $value);
             } elseif (in_array($r['formtype'], array('text', 'keyword', 'textarea', 'editor', 'title', 'author', 'omnipotent'))) {
                 $value = safe_replace($_GET['info'][$field]);
                 $r['form'] = "<input type='text' name='info[{$field}]' id='{$field}' value='" . $value . "' class='input-text search-text'/>";
             } else {
                 continue;
             }
             $forminfos[$field] = $r;
         }
     }
     //-----------
     if (isset($_GET['dosubmit'])) {
         $siteid = $this->categorys[$catid]['siteid'];
         $siteurl = siteurl($siteid);
         $this->db->set_model($modelid);
         $tablename = $this->db->table_name;
         $page = max(intval($_GET['page']), 1);
         $sql = "SELECT * FROM `{$tablename}` a,`{$tablename}_data` b WHERE a.id=b.id AND a.status=99";
         $sql_count = "SELECT COUNT(*) AS num FROM `{$tablename}` a,`{$tablename}_data` b WHERE a.id=b.id AND a.status=99";
         //构造搜索SQL
         $where = '';
         foreach ($fields as $field => $r) {
             if ($r['issearch']) {
                 $table_nickname = $r['issystem'] ? 'a' : 'b';
                 if ($r['formtype'] == 'catid') {
                     if ($_GET['info']['catid']) {
                         $where .= " AND {$table_nickname}.catid='{$catid}'";
                     }
                 } elseif ($r['formtype'] == 'number') {
                     $start = "{$field}_start";
                     $end = "{$field}_end";
                     if ($_GET[$start]) {
                         $start = intval($_GET[$start]);
                         $where .= " AND {$table_nickname}.{$field}>'{$start}'";
                     }
                     if ($_GET[$end]) {
                         $end = intval($_GET[$end]);
                         $where .= " AND {$table_nickname}.{$field}<'{$end}'";
                     }
                 } elseif ($r['formtype'] == 'datetime') {
                     if ($_GET['info'][$field]) {
                         $start = strtotime($_GET['info'][$field]);
                         if ($start) {
                             $where .= " AND {$table_nickname}.{$field}>'{$start}'";
                         }
                     }
                 } elseif ($r['formtype'] == 'box') {
                     if ($_GET['info'][$field]) {
                         $field_value = safe_replace($_GET['info'][$field]);
                         switch ($r['boxtype']) {
                             case 'radio':
                                 $where .= " AND {$table_nickname}.`{$field}`='{$field_value}'";
                                 break;
                             case 'checkbox':
                                 $where .= " AND {$table_nickname}.`{$field}` LIKE '%,{$field_value},%'";
                                 break;
                             case 'select':
                                 $where .= " AND {$table_nickname}.`{$field}`='{$field_value}'";
                                 break;
                             case 'multiple':
                                 $where .= " AND {$table_nickname}.`{$field}` LIKE '%,{$field_value},%'";
                                 break;
                         }
                     }
                 } elseif ($r['formtype'] == 'typeid') {
                     if ($_GET['info'][$field]) {
                         $typeid = intval($_GET['info'][$field]);
                         $where .= " AND {$table_nickname}.`{$field}`='{$typeid}'";
                     }
                 } elseif ($r['formtype'] == 'linkage') {
                     if ($_GET['info'][$field]) {
                         $linkage = intval($_GET['info'][$field]);
                         $where .= " AND {$table_nickname}.`{$field}`='{$linkage}'";
                     }
                 } elseif (in_array($r['formtype'], array('text', 'keyword', 'textarea', 'editor', 'title', 'author', 'omnipotent'))) {
                     if ($_GET['info'][$field]) {
                         $keywords = safe_replace($_GET['info'][$field]);
                         $where .= " AND {$table_nickname}.`{$field}` LIKE '%{$keywords}%'";
                     }
                 } else {
                     continue;
                 }
             }
         }
         //-----------
         if ($where == '') {
             showmessage(L('please_enter_content_to_search'));
         }
         $pagesize = 20;
         $offset = intval($pagesize * ($page - 1));
         $sql_count .= $where;
         $this->db->query($sql_count);
         $total = $this->db->fetch_array();
         $total = $total[0]['num'];
         if ($total != 0) {
             $sql .= $where;
             $order = '';
             $order = $_GET['orderby'] == 'a.id DESC' ? 'a.id DESC' : 'a.id ASC';
             $sql .= ' ORDER BY ' . $order;
             $sql .= " LIMIT {$offset},{$pagesize}";
             $this->db->query($sql);
             $datas = $this->db->fetch_array();
             $pages = pages($total, $page, $pagesize);
         } else {
             $datas = array();
             $pages = '';
         }
     }
     $SEO = seo($siteid, $catid, $keywords);
     include template('content', 'search');
 }
Example #19
0
 function datetime($field, $value, $fieldinfo)
 {
     extract(string2array($fieldinfo['setting']));
     $isdatetime = 0;
     if ($fieldtype == 'int') {
         if (!$value) {
             $value = SYS_TIME;
         }
         $format_txt = $format == 'm-d' ? 'm-d' : $format;
         $value = date($format_txt, $value);
         $isdatetime = strlen($format) > 6 ? 1 : 0;
     } elseif ($fieldtype == 'datetime') {
         $isdatetime = 1;
     }
     return form::date("info[{$field}]", $value, $isdatetime, 1);
 }
Example #20
0
		<th><?php 
echo L('line_time');
?>
:</th>
		<td><?php 
echo form::date('poster[startdate]', date('Y-m-d H:i:s', SYS_TIME), 1);
?>
</td>
	</tr>
	<tr>
		<th><?php 
echo L('down_time');
?>
:</th>
		<td><?php 
echo form::date('poster[enddate]', '', 1);
?>
</td>
	</tr>
	</tbody>
	</table><?php 
if (array_key_exists('images', $setting['type'])) {
    ?>
<div class="pad-10" id="imagesdiv" style="display:">
	<fieldset>
	<legend><?php 
    echo L('photo_setting');
    ?>
</legend>
	<?php 
    if ($setting['num'] > 1) {
Example #21
0
<div id="searchid" >
<form name="searchform" action="" method="get" >
<input type="hidden" value="special" name="m">
<input type="hidden" value="album" name="c">
<input type="hidden" value="import" name="a">
<input type="hidden" value="1" name="search">
<input type="hidden" value="<?php echo $_GET['menuid']?>" name="menuid">
<input type="hidden" value="<?php echo $_GET['pc_hash'];?>" name="pc_hash">
<table width="100%" cellspacing="0" class="search-form">
    <tbody>
		<tr>
		<td>
		<div class="explain-col">
 
				添加时间:
				<?php echo form::date('start_time',$_GET['start_time'],0,0,'false');?>- &nbsp;<?php echo form::date('end_time',$_GET['end_time'],0,0,'false');?>
				
				<?php echo form::select($ku6channels, $_GET['categoryid'], 'name="categoryid" id="categoryid"', '请选择频道')?>			
				标题:
				<input name="keyword" type="text" value="<?php if(isset($_GET['keyword'])) echo $_GET['keyword'];?>" class="input-text" />
				<input type="submit" name="search" class="button" value="<?php echo L('search');?>" />
	</div>
		</td>
		</tr>
    </tbody>
</table>
</form>
</div>
<div class="pad-lr-10">
<form name="myform" action="?m=special&c=album&a=import&page=<?php echo $_GET['page'];?>" method="post">
    <table width="100%" cellspacing="0" class="table-list nHover">
Example #22
0
    echo L('submit_start_update');
    ?>
" onclick="myform.type.value='lastinput';myform.submit();"></td>
    </tr>
	<tr> 
      <td><?php 
    echo L('update_time_from');
    ?>
 <?php 
    echo form::date('fromdate');
    ?>
 <?php 
    echo L('to');
    ?>
 <?php 
    echo form::date('todate');
    echo L('in_information');
    ?>
 <input type="button" name="dosubmit3" value=" <?php 
    echo L('submit_start_update');
    ?>
" class="button" onclick="myform.type.value='date';myform.submit();"></td>
    </tr>
	<tr> 
      <td><?php 
    echo L('update_id_from');
    ?>
 <input type="text" name="fromid" value="0" size="8"> <?php 
    echo L('to');
    ?>
 <input type="text" name="toid" size="8"> <?php 
Example #23
0
		<tr>
		<td><div class="explain-col"><?php 
echo L('name');
?>
  <input type="text" value="<?php 
echo $filename;
?>
" class="input-text" name="info[filename]">  <?php 
echo L('uploadtime');
?>
  <?php 
echo form::date('info[start_uploadtime]', $start_uploadtime, '1', '0', 'true', '1');
echo L('to');
?>
   <?php 
echo form::date('info[end_uploadtime]', $end_uploadtime);
?>
  <?php 
echo L('filetype');
?>
  <input type="text" value="<?php 
echo $fileext;
?>
" class="input-text" name="info[fileext]">  <input type="submit" value="<?php 
echo L('search');
?>
" class="button" name="dosubmit"> <a href="?m=attachment&c=manage&a=dir&menuid=<?php 
echo $_GET['menuid'];
?>
"><?php 
echo L('dir_schema');
Example #24
0
		<tbody id="search" <?php 
if (isset($_GET['dosubmit'])) {
    echo 'style="display:none"';
}
?>
>
		<tr>
			<td><?php 
echo L('posterize_time');
?>
:</td> 
			<td><?php 
echo form::date('start_time', $start_time ? date('Y-m-d', $start_time) : '');
?>
 - <?php 
echo form::date('end_time', $end_time ? date('Y-m-d', $end_time) : '');
?>
</td>
		</tr>
		<tr>
			<td><?php 
echo L('recommend');
?>
£º</td> 
			<td>
			<?php 
echo form::select(array('' => L('all'), '1' => L('recommend'), '2' => L('not_recommend')), $posids, 'name="posids"');
?>
			</td>
		</tr>
		<tr>
Example #25
0
		<th><?php 
echo L('line_time');
?>
£º</th>
		<td><?php 
echo form::date('poster[startdate]', date('Y-m-d H:i:s', $info['startdate']), 1);
?>
</td>
	</tr>
	<tr>
		<th><?php 
echo L('down_time');
?>
£º</th>
		<td><?php 
echo form::date('poster[enddate]', date('Y-m-d H:i:s', $info['enddate']), 1);
?>
</td>
	</tr>
	</tbody>
	</table><?php 
if (array_key_exists('images', $setting['type'])) {
    ?>
<div class="pad-10" id="imagesdiv" style="display:<?php 
    if ($info['type'] == 'flash') {
        ?>
none;<?php 
    }
    ?>
">
	<fieldset>
Example #26
0
		<?php foreach($spaces as $s) {?>
			<option value="<?php echo $s['spaceid']?>"><?php echo $s['name']?></option>
		<?php } ?></select><?php }?></td>
	</tr>
	<tr>
    	<th align="right"  valign="top"><?php echo L('poster_type')?>:</th>
        <td valign="top" colspan="2"><?php echo form::select($setting['type'], '', 'name="poster[type]" id="type" onchange="AdsType(this.value)"', $default);?>
        </td>
    </tr>
	<tr>
		<th><?php echo L('line_time')?>:</th>
		<td><?php echo form::date('poster[startdate]', date('Y-m-d H:i:s', SYS_TIME), 1)?></td>
	</tr>
	<tr>
		<th><?php echo L('down_time')?>:</th>
		<td><?php echo form::date('poster[enddate]', '', 1)?></td>
	</tr>
	</tbody>
	</table><?php if(array_key_exists('images', $setting['type'])) {?><div class="pad-10" id="imagesdiv" style="display:">
	<fieldset>
	<legend><?php echo L('photo_setting')?></legend>
	<?php if($setting['num']>1) { for($i=1; $i<=$setting['num']; $i++) {?>
	<table width="100%"  class="table_form">
	<tbody>
  <tr>
    <th width="80"><?php echo L('linkurl')?>:</th>
    <td class="y-bg"><input type="text" class="input-text" name="setting[images][<?php echo $i;?>][linkurl]" id="linkurl<?php echo $i;?>" size="30" value="http://" /></td>
    <td rowspan="2"><a href="javascript:flashupload('imgurl<?php echo $i;?>_images', '<?php echo L('upload_photo')?>','imgurl<?php echo $i;?>',preview,'1,<?php echo $this->M['ext']?>,1','poster', '', '<?php echo $authkey?>');void(0);"><img src="<?php echo IMG_PATH;?>icon/upload-pic.png" id="imgurl<?php echo $i;?>_s" width="105" height="88"></a><input type="hidden" id="imgurl<?php echo $i;?>" name="setting[images][<?php echo $i;?>][imageurl]"></td>
  </tr>
  <tr>
    <th><?php echo L('alt')?>:</th>
Example #27
0
		</tr>
		<tr>
			<td><?php 
echo L('vip');
?>
</td>
			<td>
			<?php 
echo L('isvip');
?>
 <input type="checkbox" name="info[vip]" value=1 />
			<?php 
echo L('overduedate');
?>
 <?php 
echo form::date('info[overduedate]', '', 1);
?>
			</td>
		</tr>
	</table>
</fieldset>

    <div class="bk15"></div>
    <input name="dosubmit" type="submit" id="dosubmit" value="<?php 
echo L('submit');
?>
" class="dialog">
</form>
</div>
</div>
</body>
Example #28
0
		<th><?php 
echo L('fromdate');
?>
:</th>
		<td><?php 
echo form::date('subject[fromdate]', $fromdate);
?>
</td>
	</tr>
	<tr>
		<th><?php 
echo L('todate');
?>
 :</th>
		<td><?php 
echo form::date('subject[todate]', $todate);
?>
</td>
	</tr>
    <tr>  
      <th> <?php 
echo L('vote_description');
?>
 </th>
      <td><textarea name="subject[description]" id="description" cols="60" rows="6"><?php 
echo $description;
?>
</textarea></td>
    </tr>
    
    
Example #29
0
?>
> <input name="info[islink]" type="checkbox" id="islink" value="1"<?php 
if ($info['islink']) {
    ?>
 checked<?php 
}
?>
 onclick="ruselinkurl();" > <font color="red"><?php 
echo L('islink');
?>
</font> 
	<h6> <?php 
echo L('inputtime');
?>
</h6> <?php 
echo form::date('info[inputtime]', format::date($info['inputtime'], 1), 1);
?>
	<h6> <?php 
echo L('template_style');
?>
</h6> <?php 
echo form::select($template_list, $data['style'], 'name="data[style]" id="style" onchange="load_file_list(this.value)"', L('please_select'));
?>
	<h6> <?php 
echo L('show_template');
?>
</h6> <span id="show_template"><?php 
echo '<script type="text/javascript">$.getJSON(\'?m=admin&c=category&a=public_tpl_file_list&style=' . $style . '&id=' . $data['show_template'] . '&module=special&templates=show&name=data\', function(data){$(\'#show_template\').html(data.show_template);});</script>';
?>
</span> 
          </div>
Example #30
0
<input type="hidden" value="<?php 
echo $file_upload_limit;
?>
" name="info[file_upload_limit]">
<div class="lh26" style="padding:10px 0 0">
<label><?php 
echo L('name');
?>
</label>
<input type="text" value="" class="input-text" name="info[filename]"> 
<label><?php 
echo L('date');
?>
</label>
<?php 
echo form::date('info[uploadtime]');
?>
<input type="submit" value="<?php 
echo L('search');
?>
" class="button" name="dosubmit">
</div>
</form>
<div class="bk20 hr"></div>
<ul class="attachment-list"  id="fsUploadProgress">
<?php 
foreach ($infos as $r) {
    ?>
<li>
	<div class="img-wrap">
		<a href="javascript:;" onclick="javascript:album_cancel(this,'<?php