Example #1
0
 public static function init()
 {
     self::$timestamp = time();
     self::$ssl = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on';
     if (isset($_SERVER['REMOTE_ADDR'])) {
         self::$realip = $_SERVER['REMOTE_ADDR'];
         self::$packed_realip = ip::type(self::$realip, self::$realip_type, self::$realip2);
         if (!self::$packed_realip) {
             die('IP Address Error');
         }
         self::$ip = ip::get_ip();
         self::$packed_ip = ip::type(self::$ip, self::$ip_type, self::$ip2);
         if (isset($_SERVER['HTTP_HOST'])) {
             $hosts = explode(':', $_SERVER['HTTP_HOST']);
             $num = count($hosts) - 1;
             if ($hosts[$num] == $_SERVER['SERVER_PORT']) {
                 unset($hosts[$num]);
             }
             $host = implode(':', $hosts);
         } else {
             $host = $_SERVER['SERVER_ADDR'];
         }
         $port = self::$ssl ? $_SERVER['SERVER_PORT'] == 443 ? 0 : $_SERVER['SERVER_PORT'] : ($_SERVER['SERVER_PORT'] == 80 ? 0 : $_SERVER['SERVER_PORT']);
         self::$base_url = 'http' . (self::$ssl ? 's' : '') . '://' . $host . ($port ? ':' . $port : '');
     }
 }
Example #2
0
 /**
 * 根据值,返回文本或者HTML
 *     $node   节点
 *     $value  值
 $type   返回类型 txt 文本 html 带颜色属性的HTML文本
 */
 public static function get_field_str($node, $value, $type = '')
 {
     $field = vars::get_field($node, $value);
     //print_r($field);
     if ($type == 'txt') {
         return $field['txt'];
     } else {
         return '<font color="' . $field['txt_color'] . '">' . $field['txt'] . '</font>';
     }
 }
Example #3
0
 function query($name, $args, $document)
 {
     $procedure = $this->get($name, $args);
     if ($permission = $procedure->permission()) {
         $this->access->query(vars::apply_assoc($permission, $args, true)) or runtime_error('Procedure ' . $name . ' doesn\'t meet permission ' . $permission);
     }
     if ($procedure->cache()) {
         $mangled = procedure::mangle_values($name, $args);
         if (!isset($this->cache[$mangled])) {
             $this->cache[$mangled] = $procedure->query($args, $document);
         }
         return $this->cache[$mangled];
     } else {
         return $procedure->query($args, $document);
     }
 }
Example #4
0
 function query($args, $document)
 {
     $this->validate($args);
     $xml = new xml();
     $get = [];
     foreach ($this->get as $name => $value) {
         $get[$name] = vars::apply_assoc($value, $args);
     }
     switch ($this->method) {
         case 'get':
             return self::to_xml(http::get($this->url, $get, $this->datasource['username'], $this->datasource['password']));
         case 'post':
             $post = [];
             foreach ($this->post as $name => $value) {
                 $post[$name] = vars::apply_assoc($value, $args);
             }
             return self::to_xml(http::post($this->url, $post, $get, $this->datasource['username'], $this->datasource['password']));
         default:
             runtime_error('Unknown HTTP procedure method: ' . $this->method);
     }
 }
Example #5
0
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * @link http://wcms.berlios.de/
 * @copyright 2005 Martin Nicholls
 * @author Martin Nicholls <webmasta at streakyland dot co dot uk>
 * @package wCMS
 * @version $Revision: 1.9 $
 */
/* $Id: content.php,v 1.9 2005/08/31 09:12:01 streaky Exp $ */
require_once "boot.php";
$item = !vars::get('page') ? "home_page" : vars::get('page');
$item = preg_replace("#\\W#", "", $item);
$page_content = $content->retrieve($item);
foreach ($page_content['family_tree'] as $key => $val) {
    $breadcrumb[] = $key != 0 ? "<a href='" . path::http() . "?page={$val['ident']}'>{$val['title']}</a>" : $val['title'];
}
$breadcrumb = array_reverse($breadcrumb);
$breadcrumb = implode(" &gt; ", $breadcrumb);
$smarty->assign("breadcrumb", $breadcrumb);
$page_handler->add_page_item($page_content['content'] . $bread_crumb, $page_content['title']);
$footer = $content->create_content_footer($page_content['ident'], $page_content['last_mod'], $page_content['revision'], $page_content['title']);
$page_handler->add_footer($footer);
$page_handler->output_page($page_content['title']);
Example #6
0
    ?>
</div></td>
                        <td><?php 
    echo $r['uname'];
    ?>
</td>
                        <td><?php 
    echo date('Y-m-d H:i:s', $r['date_add']);
    ?>
</td>
                        <td><?php 
    echo $r['ip'];
    ?>
</td>
                        <td><?php 
    echo vars::get_field_str('is_check', $r['is_check'], '');
    ?>
</td>
                        <td>


                            <?php 
    echo show_button(array('class' => 'but2 but2s but2r', 'onclick' => "del('{$r['comment_id']}','1')", 'text' => '删除', 'level' => 'E0701'));
    if ($r['is_check'] == 1) {
        echo show_button(array('class' => 'but2 but2s but2o1', 'onclick' => "edit('{$r['comment_id']}','0')", 'text' => '屏蔽', 'level' => 'E0702'));
    } else {
        echo show_button(array('class' => 'but2 but2s  but2o', 'onclick' => "edit('{$r['comment_id']}','1')", 'text' => '通过', 'level' => 'E0702'));
    }
    echo show_button(array('class' => 'but2 but2s', 'onclick' => "show_reply('{$r['comment_id']}','{$r['info_id']}')", 'text' => '回复', 'level' => 'E0703'));
    ?>
                        </td>
Example #7
0
                            <tr>
                                <td>&nbsp;</td>
                                <td><a href=" javascript:void(0);" class="but2" id="subtn"  onclick="save()" >确 定</a></td>
                            </tr>
                        </table>
                        <?php 
}
?>
                    </div>
                    <div>
                        <table class="tb3" style="clear:both;table-layout:fixed;display:none;" id="tab7">
                        <tr>
                            <td width="160">分组显示方式:</td>
                            <td class="alignleft" >
                                <?php 
echo vars::input_str(array('node' => 'qq_show_style', 'type' => 'radio', 'default' => QQ_SHOW_STYLE));
?>
                            </td>
                        </tr>
                        <tr>
                            <td>分组客服QQ:</td>
                            <td class="alignleft" ><textarea id="qq_list" style="width:400px;height:100px;font-size:12px;"><?php 
echo QQ_LIST;
?>
</textarea> ###分割代表分组,||分割代表组标题,多个QQ号用英文逗号分割,不能有换行&nbsp;如:售前咨询||90001251,90001252,90001253###技术支持||90001251,90001252,90001253</td>
                        </tr>
                        <tr>
                            <td>固定客服QQ:</td>
                            <td class="alignleft" ><input class="ipt" id="qq" value="<?php 
if (defined('QQ')) {
    echo QQ;
Example #8
0
 function query($args, $document)
 {
     $this->validate($args);
     $xml = new xml();
     $solr = $this->datasource->get($this->core);
     switch ($this->method) {
         case 'add':
             !empty($args) or runtime_error('Solr add method should accept parameters');
             if (is_array(reset($args))) {
                 $docs = array();
                 foreach (reset($args) as $document) {
                     $doc = new SolrInputDocument();
                     foreach ($document as $name => $value) {
                         if (is_array($value)) {
                             foreach ($value as $element) {
                                 $doc->addField($name, $element);
                             }
                         } else {
                             $doc->addField($name, $value);
                         }
                     }
                     $docs[] = $doc;
                 }
                 $solr->addDocuments($docs);
             } else {
                 $doc = new SolrInputDocument();
                 foreach ($args as $name => $value) {
                     $doc->addField($name, $value);
                 }
                 $solr->addDocument($doc);
             }
             $solr->request("<commit/>");
             break;
         case 'delete':
             $solr->deleteByQuery(vars::apply_assoc($this->body, $args));
             $solr->request("<commit/>");
             break;
         case 'query':
             $root = $xml->element($this->root[0]);
             $xml->append($root);
             $query = new SolrQuery(vars::apply_assoc($this->body, $args));
             foreach ($this->order_by as $name => $order) {
                 $query->addSortField($name, $order == 'desc' ? SolrQuery::ORDER_DESC : SolrQuery::ORDER_ASC);
             }
             if (!is_null($this->offset)) {
                 $query->setStart(vars::apply_assoc($this->offset, $args));
             }
             is_null($this->count) or $query->setRows(vars::apply_assoc($this->count, $args));
             $response = $solr->query($query);
             $object = $response->getResponse();
             if (is_array($object['response']['docs'])) {
                 $root['@matched'] = $object['response']['numFound'];
                 foreach ($object['response']['docs'] as $doc) {
                     $item = $xml->element($this->item[0]);
                     $root->append($item);
                     foreach ($doc as $name => $value) {
                         if (is_array($value)) {
                             $array = $xml->element($name);
                             $item->append($array);
                             foreach ($value as $element) {
                                 $element = $xml->element('element', $element);
                                 $array->append($element);
                             }
                         } else {
                             $node = $this->transform($xml, $name, $value);
                             $item->append($node);
                         }
                     }
                 }
             } else {
                 $this->empty or runtime_error('Procedure returned an empty result: ' . $this->mangled());
             }
             break;
         default:
             runtime_error('Unknown Solr method: ' . $this->method);
     }
     return $xml;
 }
Example #9
0
function tpl__model_field()
{
    global $page;
    ?>
		<div id="edit_table_div" >
			<div style="overflow-x:hidden;overflow-y:scroll;height:450px;">
            <input type="hidden" id="model_id" value="<?php 
    echo $page['model_id'];
    ?>
">
				<table class="tb3">
					<tbody>
						<tr>
							<th>
								排序
							</th>
							<th>
								字段文字
							</th>
							<th>
								字段名称
							</th>
							<th>
								字段类型
							</th>
							<th>
								表单类型
							</th>
							<th>
								预选值
							</th>
							<th>
								是否特殊字段
							</th>
							<th width="120">
								<a class="but2 but2s but2o" style="margin-right:10px;" onclick="attr_add();">
									添加
								</a>
							</th>
						</tr>
					</tbody>
					<tbody id="html_extern_body">
                        <?php 
    if (!empty($page['list'])) {
        foreach ($page['list'] as $k => $v) {
            ?>
						<tr id="<?php 
            echo "edit_extern_" . $k;
            ?>
">
							<td>
								<input type="text" id="forder" class="ipt" style="width:30px;min-width:30px;text-indent:2px;"
								value="<?php 
            echo $v['forder'];
            ?>
">
							</td>
							<td>
								<input type="text" id="title" class="ipt" style="width:80px;min-width:80px;"
								value="<?php 
            echo $v['title'];
            ?>
">
							</td>
							<td>
								<input type="text" id="field" class="ipt" style="width:80px;min-width:80px;"
								disabled="" readonly="" value="<?php 
            echo $v['field'];
            ?>
">
							</td>
							<td>
								<input type="text" id="field_type" class="ipt" style="width:180px;min-width:80px;"
								value="<?php 
            echo $v['field_type'];
            ?>
">
							</td>
							<td>
								<select id="form_type">
									<option value="text">
										文本框
									</option>
									<option value="textarea" selected="">
										多行文本
									</option>
									<option value="checkbox">
										复选框
									</option>
									<option value="radio">
										单选框
									</option>
									<option value="select">
										下拉框
									</option>
									<option value="date">
										日期
									</option>
									<option value="editor">
										编辑器
									</option>
									<option value="upload">
										上传资源
									</option>
								</select>
							</td>
							<td>
								<input id="form_value" class="ipt" type="text" style="width:100px;" value="<?php 
            echo $v['form_value'];
            ?>
">
							</td>
							<td>
								<select id="field_remark">
                                    <?php 
            foreach (vars::fields_array('field_remark') as $key => $val) {
                $selected = '';
                if ($v['field_remark'] == $val['value']) {
                    $selected = "'selected'";
                }
                ?>
									<option value="<?php 
                echo $val['value'];
                ?>
" <?php 
                echo $selected;
                ?>
>
										<?php 
                echo $val['txt'];
                ?>
									</option>
                                    <?php 
            }
            ?>
								</select>
							</td>
							<td>
								<a class="but2 but2s but2r" style="margin:0 10px 0 0;" href="javascript:void(0);"
								onclick="del_attr(<?php 
            echo $k;
            ?>
);">
									删除
								</a>
								<a class="but2 but2s" style="margin:0 10px 0 0;" href="javascript:void(0);"
								onclick="save_attr(<?php 
            echo $k;
            ?>
);">
									保存
								</a>
							</td>
						</tr>
                        <?php 
        }
    }
    ?>
					</tbody>
				</table>
			</div>
		</div>
		<?php 
}
Example #10
0
 private function replace_www($template, $document, $args = array())
 {
     foreach ($document->query('//www:*') as $node) {
         $nested = null;
         switch ($node->name()) {
             case 'www:template':
                 $nested = $this->render_template($template->get($node['@name']));
                 break;
             case 'www:xslt':
                 $args = $node->attribute('args');
                 if ($node->attribute('cache') !== 'true') {
                     $nested = $this->render_xslt($template, $node['@xsl'], $node['@xml'], $args ? args::decode($args) : array());
                 } else {
                     $cache_args = $node->attribute('cache-args') ? $node->attribute('cache-args') : array();
                     $cache_lifetime = $node->attribute('cache-lifetime');
                     is_null($cache_lifetime) or is_numeric($cache_lifetime) or runtime_error('Cache lifetime should be numeric: ' . $cache_lifetime);
                     $cache_args = args::decode($cache_args);
                     $filename = cache_location . md5($node['@xsl'] . $node['@xml'] . ($args ? $args : '')) . '.xml';
                     if (!fs::exists($filename) || $cache_lifetime && $cache_lifetime > time() - fs::modification($filename)) {
                         fs::write($filename, $this->render_xslt($template, $node['@xsl'], $node['@xml'], $args ? args::decode($args) : array())->render(false));
                     }
                     $fragment = fs::checked_read($filename);
                     if (!empty($cache_args)) {
                         $fragment = vars::apply_assoc($fragment, $cache_args);
                     }
                     $nested = $document->fragment($fragment);
                 }
                 break;
             case 'www:xquery':
                 require_once www_root . 'thirdparty/xquerylite/class_xquery_lite.php';
                 $xq = new XqueryLite();
                 $fragment = $xq->evaluate_xqueryl(fs::checked_read($node['@src']));
                 $nested = $document->fragment($fragment);
                 break;
             case 'www:style':
                 $src = $node['@src'];
                 $nested = $document->element('link');
                 $nested['@rel'] = 'stylesheet';
                 $nested['@href'] = $src . '?' . fs::crc32($src);
                 break;
             case 'www:script':
                 $src = $node['@src'];
                 $nested = $document->element('script', '');
                 $nested['@type'] = 'text/javascript';
                 $nested['@src'] = $src . '?' . fs::crc32($src);
                 break;
             case 'www:img':
                 $src = $node['@src'];
                 $nested = $document->element('img');
                 $nested['@src'] = $src . '?' . crc32(fs::modification($src));
                 foreach ($node->attributes() as $name => $value) {
                     if ($name != 'src') {
                         $nested['@' . $name] = $value;
                     }
                 }
                 break;
             case 'www:bbcode':
                 $allow = $node->attribute('allow');
                 $deny = $node->attribute('deny');
                 $nested = bbcode::parse($node, $allow ? preg_split('/, */', $allow) : null, $deny ? preg_split('/, */', $deny) : null);
                 break;
             default:
                 runtime_error('Unknown extension element: ' . $node->name());
         }
         self::replace_node($document, $node, $nested);
     }
 }
Example #11
0
            <td  class="alignleft"><input type="text"  class="ipt"  id="flink_url"   name="flink_url" value=""/> <span> 以 http:// 开头</span></td>
        </tr>
        <tr>
            <td>LOGO图片:</td>
            <td  class="alignleft">
                <div class="l"><input type="text" class="ipt" id="flink_img" name="flink_img" value=""/></div>
                <div class="l" style="margin-left:10px;margin-left:5px \9;vertical-align:bottom;">
                    <script>C.create_upload_iframe('{"func":"callback_upload_thumb","vid":"flink_img","thumb":{"width":"300","height":"300"}}');</script>
                </div>
                <div class="l" style="margin-left:10px;"><span id="thumb_flink_img"></span></div>
            </td>
        </tr>
        <tr>
            <td>链接位置:</td>
            <td  class="alignleft"><?php 
echo vars::input_str(array('node' => 'flink_is_site', 'type' => 'radio', 'default' => '0'));
?>
</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td  class="alignleft"><a href="javascript:void(0);" class="but2 ml5" id="subtn" onclick="flink_edit();">确 定</a></td>
        </tr>
    </table>
    </form>
</div>
<!-- 修改分组的隐藏表单 -->
<div id="editgroup" style="display:none;overflow-x:hidden;overflow-y:auto;">
    <form id="group_form">
    <table class="tb3" id="editgroup_"></table></form>
</div>
Example #12
0
                    <td class="alignleft"><input type="text" class="ipt" id="corder" name="corder"  value="0"/>
                    &nbsp;&nbsp;&nbsp;&nbsp;<span class="desc">序号小的排前面</span>
                    </td>
                </tr>
                <tr>
                    <td width="80">PC导航显示:</td>
                    <td><?php 
echo vars::input_str(array('node' => 'nav_show', 'type' => 'radio', 'default' => '0'));
?>
                    &nbsp;&nbsp;&nbsp;&nbsp;<span class="desc">自动输出分类时,默认在pc端为导航中不显示</span>
                    </td>
                </tr>
                <tr>
                    <td width="80">WAP导航显示:</td>
                    <td><?php 
echo vars::input_str(array('node' => 'nav_show_wap', 'type' => 'radio', 'default' => '0'));
?>
                    &nbsp;&nbsp;&nbsp;&nbsp;<span class="desc">自动输出分类时,默认在wap导航中不显示</span>
                    </td>
                </tr>
                <tr>
                    <td>分类图片:</td>
                    <td class="alignleft" >
                        <div class="l"><input type="text" class="ipt" id="clogo" name="clogo" style="float:left; margin-right:10px;"  value="0"/></div>
                        <div class="l">
                           <script>C.create_upload_iframe('{"func":"callback_upload_thumb","vid":"clogo","thumb":{"width":"300","height":"300"}}');</script>
                        </div>
                        <div class="l" style="margin-left:10px;"><span id="thumb_clogo"></span></div>
                        <div class="l">&nbsp;&nbsp;&nbsp;&nbsp;<span class="desc">一般用于分类作为专题时候的专题图片</span></div>
                    </td>
                </tr>
Example #13
0
function tpl__add()
{
    global $page;
    ?>
		<!-- 添加友链的表单 -->
		<div id="addflink" class="add_form_top">
			<form id="flink_form">
			<table class="tb3">
				<input type="hidden" id="flink_id" value="<?php 
    echo $page['flink']['flink_id'];
    ?>
">
				<th colspan="2">添加/编辑友情链接</th>
				<tr>
					<td  width="80">排序:</td>
					<td  class="alignleft"><input type="text" size="10" class="ipt"  id="flink_order"   name="flink_order" value="<?php 
    echo $page['flink']['flink_order'];
    ?>
" style="width:150px"/> 数字小的排前面</td>
				</tr>
				<tr>
					<td>链接分组:</td>
					<td  class="alignleft">
						<select onchange="$('#flink_group').val(this.value);" class="flink_group" id="flink_group_id" name="flink_group_id">
							<option value="0">请选择链接分组</option>
						<?php 
    foreach ($page['group_list']['list'] as $key => $val) {
        $selected = $val['flink_group_id'] == $page['flink']['flink_group_id'] ? "selected" : '';
        echo '<option value="' . $val['flink_group_id'] . '" ' . $selected . '>' . $val['flink_group_name'] . '</option>';
    }
    ?>
						</select> 我要添加<a href="">友链分组</a>
					</td>
				</tr>
				<tr>
					<td>链接名称:</td>
					<td  class="alignleft"><input type="text" class="ipt"  id="flink_name"   name="flink_name" value="<?php 
    echo $page['flink']['flink_name'];
    ?>
"/></td>
				</tr>
				<tr>
					<td>链接地址:</td>
					<td  class="alignleft"><input type="text"  class="ipt"  id="flink_url"   name="flink_url" value="<?php 
    echo $page['flink']['flink_url'];
    ?>
"/> <span> 以 http:// 开头</span></td>
				</tr>
				<tr>
					<td>LOGO图片:</td>
					<td  class="alignleft">
						<div class="l"><input type="text" class="ipt" id="flink_img" name="flink_img" value="<?php 
    echo $page['flink']['flink_img'];
    ?>
"/></div>
						<div class="l" style="margin-left:10px;"><span id="thumb_flink_img"><?php 
    if (!empty($page['flink']['flink_img'])) {
        echo "<img src=" . $page['flink']['flink_img'] . " height='30'/>";
    }
    ?>
</span></div>
						<div class="l" style="margin-left:10px;margin-left:5px \9;vertical-align:bottom;">
							<script>C.create_upload_iframe('{"func":"callback_upload_thumb","vid":"flink_img","thumb":{"width":"300","height":"300"}}');</script>
						</div>
					</td>
				</tr>
				<tr>
					<td>链接位置:</td>
					<td  class="alignleft"><?php 
    echo vars::input_str(array('node' => 'flink_is_site', 'type' => 'radio', 'default' => $page['flink']['flink_is_site']));
    ?>
</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td  class="alignleft"><a href="javascript:void(0);" class="but2 ml5" id="subtn" onclick="flink_edit();">确 定</a></td>
				</tr>
			</table>
			</form>
		</div>
		<?php 
}
Example #14
0
    </div><!-- 右侧主体内容结束 -->
    
    <?php 
require_once dirname(__FILE__) . "/inc_footer.php";
?>

</div><!-- 右侧区域结束 -->

<!-- 隐藏表单半透明层 -->
<div id="table_div" style="display:none;">
    <form id="add_extern">
    <div>
        <table class="tb3">
            <tr><td>模型名称:</td><td><input id="extern_title" type="text" class="ipt"> * 中文标识</td></tr>
            <tr><td>模型类型:</td><td><?php 
echo vars::input_str(array('node' => 'extern_type', 'default' => 0));
?>
 * 独立表不跟内容主表关联</td></tr>
            <tr><td>表名:</td><td><input id="extern_name" type="text" class="ipt"> * 模型表名,字母数字和下划线</td></tr>
            <tr><td>备注:</td><td><textarea id="attr_content" style="width:400px;"></textarea></td></tr>
            <tr><td>&nbsp;</td><td><a class="but2" href="javascript:void(0);" onclick="add_extern();">添加模型</td></tr>
        </table>
    </div>
    </form>
</div>
<div id="edit_table_div" style="display:none;">
    <input type="hidden" id="table_name" value="">
    <div style="margin:10px;overflow-x:hidden;overflow-y:scroll;height:450px;">
        <div style="margin:0 0 10px 0;line-height:180%;"><b>每个模型可以有多个字段,添加或编辑一个字段都需要单独保存,编辑完字段后需要更新表结构 &nbsp;&nbsp;这里的<font color="red">表单类型</font>不建议使用编辑器</b><br>
        <font color=red>说明:【字段类型】varchar(100) not null default '';&nbsp;&nbsp;【预选值】1|2|3,多个用竖线分开,多值表单为值项,单值表单为默认值;</font></div>
        <table class="tb">
Example #15
0
function tpl__list()
{
    global $page;
    ?>
        <div class="mt10">
            <table class="tb" >
                <tr>
                    <th width="80"><a href="javascript:void(0);" onClick="C.form.check_all('.infoff');">全选/反选</a></th>
                    <th align='center' width="50">用户ID</th>
                    <th align='center'>用户名称</th>
                    <th class="alignleft">邮箱</th>
                    <th>QQ</th>
                    <th>手机号</th>
                    <th>状态</th>
                    <th></th>
                </tr>

               <?php 
    foreach ($page['list'] as $key => $val) {
        $msg_state = $val['ustate'] == 0 ? 1 : 0;
        ?>
                <tr>
                    <td><input type="checkbox" class="cklist infoff" value="<?php 
        echo $val['user_id'];
        ?>
" /></td>
                    <td><?php 
        echo $val['user_id'];
        ?>
</td>
                    <td><?php 
        echo $val['uname'];
        ?>
</td>
                    <td><?php 
        echo $val['uemail'];
        ?>
</td>
                    <td><?php 
        echo $val['uqq'];
        ?>
</td>
                    <td><?php 
        echo $val['uphone'];
        ?>
</td>
                    <td><?php 
        echo vars::get_field_str("ustate", $val['ustate']);
        ?>
</td>
                    <td>
                        <?php 
        echo show_button(array('class' => 'but2 but2s', 'href' => "user.php?m=add&uid={$val['user_id']}", 'text' => "编辑", 'level' => 'B0201'));
        echo show_button(array('class' => 'but2 but2s but2o', 'href' => "javascript:void(0);", 'onclick' => "update_state({$val['user_id']},{$val['ustate']})", 'text' => vars::get_field_str("ustate_a", $msg_state), 'level' => 'B0203'));
        ?>
                    </td>
                </tr>
               <?php 
    }
    ?>
            </table>
            <div class="pagebar clearfix"><?php 
    echo $page['pagebar']['pagecode'];
    ?>
</div>
        </div>
        <?php 
}
Example #16
0
    <?php 
require_once dirname(__FILE__) . "/inc_footer.php";
?>

</div><!-- 右侧区域结束 -->

<!-- 隐藏表单半透明层 -->
<div id="table_div" style="display:none;">
    <form id="add_recommend">
    <div>
        <input type="hidden" id="area_id" value="">
        <table class="tb3">
            <tr><td>广告位名称:</td><td><input id="title" type="text" class="ipt"></td></tr>
            <tr><td>广告位类型:</td><td><?php 
echo vars::input_str(array('node' => 'ad_type', 'type' => 'select'));
?>
</td></tr>
            <tr><td>备注:</td><td><textarea id="area_remarks" class="ipt" style="width:360px;height:130px;"></textarea></td></tr>
            <tr><td>&nbsp;</td><td><a class="but2" href="javascript:void(0);" onclick="add_recommend();" id="btn_add_recommend">添加广告位</td></tr>
        </table>
    </div>
    </form>
</div>
<div id="edit_table_div" style="display:none;">
    <div class="l" style="margin:10px 10px 10px 0;padding-left:10px;" id="code_type">
        <input type="text" class="ipt l" id="flash_file" name="flash_file" value=""/>
        <div class="l" style="margin-left:10px;margin-left:5px \9;vertical-align:bottom;">
            <script>C.create_upload_iframe('{"func":"callback_upload_flash","vid":"flash_file","thumb":{"width":"300","height":"300"}}');</script>
        </div>
        <div class="r" style="margin-left:10px;margin-left:5px \9;vertical-align:bottom;color:red;">
Example #17
0
function tpl__list()
{
    global $page;
    ?>
        <div>
            <table class="tb">
                <form>
                <tr>
                    <th width="80"><a href="javascript:void(0);" onclick="C.form.check_all('.ccomment');">全选/反选</a></th>
					<th width="60">文章ID</th>
                    <th width="400"  class="alignleft">评论内容</th>
                    <th>用户</th>
                    <th>评论时间</th>
                    <th>IP地址</th>
                    <th width="50">状态</th>
                    <th width="130"></th>
                </tr>
                <?php 
    foreach ($page['list'] as $key => $val) {
        ?>
                    <tr>
                        <td><input type="checkbox" class="ccomment" value="<?php 
        echo $val['comment_id'];
        ?>
" /></td>
						<td><a href="<?php 
        //echo $val['url'];
        ?>
" title="<?php 
        // echo $val['comment'];
        ?>
" target="_blank"><?php 
        echo $val['info_id'];
        ?>
</a></td>
                        <td width="400" class="alignleft"><div style="height:24px; line-height:24px; width:350px; overflow:hidden;"><?php 
        echo $val['content'];
        ?>
</div></td>
                        <td><?php 
        echo $val['uname'];
        ?>
</td>
                        <td><?php 
        echo date('Y-m-d H:i:s', $val['date_add']);
        ?>
</td>
                        <td><?php 
        echo $val['ip'];
        ?>
</td>
                        <td><?php 
        echo vars::get_field_str('is_check', $val['is_check'], '');
        ?>
</td>
                        <td>


                            <?php 
        echo show_button(array('class' => 'but2 but2s but2r', 'onclick' => "del('{$val['comment_id']}','1')", 'text' => '删除', 'level' => 'E0702'));
        if ($val['is_check'] == 1) {
            echo show_button(array('class' => 'but2 but2s but2o1', 'onclick' => "check('{$val['comment_id']}','0')", 'text' => '屏蔽', 'level' => 'H0603'));
        } else {
            echo show_button(array('class' => 'but2 but2s  but2o', 'onclick' => "check('{$val['comment_id']}','1')", 'text' => '通过', 'level' => 'H0603'));
        }
        echo show_button(array('class' => 'but2 but2s', 'onclick' => "show_reply('{$val['comment_id']}','{$val['info_id']}')", 'text' => '回复', 'level' => 'H0604'));
        ?>
                        </td>
                    </tr>
                <?php 
    }
    ?>
                </form>
            </table>
            <div class="pagebar"><?php 
    echo $page['pagebar']['pagecode'];
    ?>
</div>
            <div class="clear"></div>
        </div>
        <?php 
}
Example #18
0
function tpl__add()
{
    global $page, $c_obj;
    ?>
        <div id="e_box">
            <style>.desc{color:orange;}</style>
            <form id="cate_form">
            <table class="tb3" width="100%" id="tab1" style="clear:both" >
                <input type="hidden" id="cate_id" name="cate_id" class='ipt' value="<?php 
    echo $page['cate']['cate_id'];
    ?>
" />
                <input type="hidden" id="model_id" name="model_id" class='ipt' value="0" />
                <th colspan="2">添加/编辑分类</th>
                <tr>
                    <td width="100">上级栏目:</td>
                    <td class="alignleft">
                      <select id="parent_id" name="parent_id">
                      <option value="0">≡ 作为一级栏目 ≡</option>
                      <?php 
    $c_obj->html_cate_select($page['cate_tree'], $page['cate']['parent_id']);
    ?>
                      </select>
                    </td>
                </tr>
                <tr>
                    <td>分类名称:</td>
                    <td class="alignleft"><input type="text" class="ipt" id="cname" name="cname" value="<?php 
    echo $page['cate']['cname'];
    ?>
"/>
                    &nbsp;&nbsp;&nbsp;&nbsp;<span class="desc" style="color:red"> * 必填</span>
                    </td>
                </tr>
                <tr>
                    <td>字母别名:</td>
                    <td class="alignleft"><input type="text" class="ipt" id="cname_py" name="cname_py"  value="<?php 
    echo $page['cate']['cname_py'];
    ?>
"/>
                    <a  href="javascript:void(0);" class="but2"  onclick="get_pinyin();" >获取拼音</a>
                    &nbsp;&nbsp;&nbsp;&nbsp;<span class="desc" style="color:red"> * 必填</span>
                    </td>
                </tr>
                <tr>
                    <td>分类别名:</td>
                    <td class="alignleft"><input type="text" class="ipt" id="cnick" name="cnick" value="<?php 
    echo $page['cate']['cnick'];
    ?>
"/>
                    &nbsp;&nbsp;&nbsp;&nbsp;<span class="desc" style="color:red"> * 比如中文别名,这里就可以填写英文别名</span>
                    </td>
                </tr>
                <tr>
                    <td>排序:</td>
                    <td class="alignleft"><input type="text" class="ipt" id="corder" name="corder"  value="<?php 
    echo $page['cate']['corder'];
    ?>
"/>
                    &nbsp;&nbsp;&nbsp;&nbsp;<span class="desc">序号小的排前面</span>
                    </td>
                </tr>
                <tr>
                    <td width="80">PC导航显示:</td>
                    <td><?php 
    echo vars::input_str(array('node' => 'nav_show', 'type' => 'radio', 'default' => $page['cate']['nav_show']));
    ?>
                    &nbsp;&nbsp;&nbsp;&nbsp;<span class="desc">自动输出分类时,默认在pc端为导航中不显示</span>
                    </td>
                </tr>
                <tr>
                    <td width="80">WAP导航显示:</td>
                    <td><?php 
    echo vars::input_str(array('node' => 'nav_show_wap', 'type' => 'radio', 'default' => $page['cate']['nav_show_wap']));
    ?>
                    &nbsp;&nbsp;&nbsp;&nbsp;<span class="desc">自动输出分类时,默认在wap导航中不显示</span>
                    </td>
                </tr>
                <tr>
                    <td>分类图片:</td>
                    <td class="alignleft" >
                        <div class="l"><input type="text" class="ipt" id="clogo" name="clogo" style="float:left; margin-right:10px;"  value="<?php 
    echo $page['cate']['clogo'];
    ?>
"/></div>
                        <div class="l">
                           <script>C.create_upload_iframe('{"func":"callback_upload_thumb","vid":"clogo","thumb":{"width":"300","height":"300"}}');</script>
                        </div>
                        <div class="l" style="margin-left:10px;">
                            <span id="thumb_clogo"><?php 
    if (!empty($page['cate']['clogo'])) {
        echo '<img src="' . $page['cate']['clogo'] . '" height="27"/>';
    }
    ?>
</span>
                        </div>
                        <div class="l">&nbsp;&nbsp;&nbsp;&nbsp;<span class="desc">一般用于分类作为专题时候的专题图片</span></div>
                    </td>
                </tr>
                <tr>
                    <td>跳转URL:</td>
                    <td class="alignleft"><input type="text" class="ipt" id="go_url" name="go_url"  value="<?php 
    echo $page['cate']['go_url'];
    ?>
"/>
                    &nbsp;&nbsp;&nbsp;&nbsp;<span class="desc">分类直接跳转到其他URL</span><br><font color=red>可以用作分类绑定域名,如:http://news.mcms.cc,后面不要带斜杠,该域名解析到同本站一个目录</font>
                    </td>
                </tr>
                <?php 
    $tpl = show_tpl();
    //print_r($tpl);
    ?>
                <tr>
                    <td width="120">封面模版:</td>
                    <td class="alignleft">
                    <select id="tpl_index" >
                        <option value="">默认</option>
                        <?php 
    foreach ($tpl['cover'] as $v) {
        $selected = $v == $page['cate']['tpl_index'] ? 'selected' : '';
        echo '<option value="' . $v . '" ' . $selected . '>' . $v . '</option>';
    }
    ?>
                    </select>
                    &nbsp;&nbsp;&nbsp;&nbsp;<span class="desc">频道栏目封面模板,一般没有分页</span>,文件名以 <font color=red>cover_</font> 开头
                    </td>
                </tr>
                <tr>
                    <td>封面模板应用到:</td>
                    <td class="alignleft">
                        <label><input type="radio" name="index_copy" value="son">&nbsp;&nbsp;下一级分类</label>&nbsp;&nbsp;&nbsp;&nbsp;
                        <label><input type="radio" name="index_copy" value="all">&nbsp;&nbsp;全部下级分类</label>
                    </td>
                </tr>
                <tr>
                    <td>列表模板:</td>
                    <td class="alignleft">
                    <select id="tpl_listvar" >
                        <option value="">默认</option>
                        <?php 
    foreach ($tpl['list'] as $v) {
        $selected = $v == $page['cate']['tpl_listvar'] ? 'selected' : '';
        echo '<option value="' . $v . '" ' . $selected . '>' . $v . '</option>';
    }
    ?>
                    </select>
                    &nbsp;&nbsp;&nbsp;&nbsp;<span class="desc">分类列表模板,一般有分页</span>,文件名以 <font color=red>list_</font> 开头
                    </td>
                </tr>
                <tr>
                    <td>列表模板应用到:</td>
                    <td class="alignleft">
                        <label><input type="radio" name="listvar_copy" value="son">&nbsp;&nbsp;下一级分类</label>&nbsp;&nbsp;&nbsp;&nbsp;
                        <label><input type="radio" name="listvar_copy" value="all">&nbsp;&nbsp;全部下级分类</label>
                    </td>
                </tr>
                <tr>
                    <td>详情模版:</td>
                    <td class="alignleft">
                    <select id="tpl_content" >
                        <option value="">默认</option>
                        <?php 
    foreach ($tpl['content'] as $v) {
        $selected = $v == $page['cate']['tpl_content'] ? 'selected' : '';
        echo '<option value="' . $v . '" ' . $selected . '>' . $v . '</option>';
    }
    ?>
                    </select>
                    &nbsp;&nbsp;&nbsp;&nbsp;<span class="desc">内容正文模板</span>,文件名以 <font color=red>content_</font> 开头
                    </td>
                </tr>
                <tr>
                    <td>详情模板应用到:</td>
                    <td class="alignleft">
                        <label><input type="radio" name="content_copy" value="son">&nbsp;&nbsp;下一级分类</label>&nbsp;&nbsp;&nbsp;&nbsp;
                        <label><input type="radio" name="content_copy" value="all">&nbsp;&nbsp;全部下级分类</label>
                    </td>
                </tr>
                <tr>
                    <td>绑定广告位:</td>
                    <td><label><input class="ipt" style="width:100px;" type="text" name="ad_id" id="ad_id" value="0"></label>&nbsp;&nbsp;请输入对应的<span class="desc">广告位id</span>&nbsp;&nbsp;
                    <label>
                        <select name="ad_list" id="ad_list">
                        <option value="0">请选择广告位</option>
                        <?php 
    foreach ($page['ad']['list'] as $k => $v) {
        ?>
                        <option value="<?php 
        echo $v['area_id'];
        ?>
"><?php 
        echo $v['area_name'];
        ?>
</option>
                        <?php 
    }
    ?>
                        </select>
                    </label>
                    </td>
                </tr>
                <tr>
                    <td width="80">SEO标题:</td>
                    <td class="alignleft" >
                        <input type="text" id="ctitle" name="ctitle" class="ipt mar10" style="width:610px;" value="<?php 
    echo $page['cate']['ctitle'];
    ?>
"/>
                        <br><span class="desc">用于分类模板页的 title 标签替换</span>
                    </td>
                </tr>
                <tr>
                    <td align="left">SEO关键词:</td>
                    <td class="alignleft">
                        <input id="ckey" name="ckey" class="ipt mar10" style="width:610px;" value="<?php 
    echo $page['cate']['ckey'];
    ?>
"/>
                        <br><span class="desc">用于分类模板页的 meta 标签name等于keywords属性替换</span>
                    </td>
                </tr>
                <tr>
                    <td>SEO描述:</td>
                    <td class="alignleft">
                        <textarea id="cdesc" name="cdesc" class="ipt mar10" style="width:610px; height:70px;"><?php 
    echo $page['cate']['cdesc'];
    ?>
</textarea>
                        <br><span class="desc">用于分类模板页的 meta 标签name等于description属性替换</span>
                    </td>
                </tr>
                <tr>
                    <td>分类简介:</td>
                    <td class="alignleft">
                        <textarea id="cintro" name="cintro" class="ipt mar10" style="width:610px; height:70px;"><?php 
    echo $page['cate']['cintro'];
    ?>
</textarea>
                        <br><span class="desc">分类的其他一些需要特别说明的东西,比如添加的都是些什么东西啊!</span>
                    </td>
                </tr>
                <tr>
					<td>&nbsp;</td>
					<td class="alignleft"><a href="javascript:void(0);" class="but2 ml5" id="subtn" onclick="cate_save();">确 定</a></td>
				</tr>
            </table>
            </form>
        </div>
        <?php 
}
Example #19
0
         require_once path::file("classes") . "revision_class.php";
         $revisions = new revision_history();
         $rev = $rows[0]['cont_revision'];
         $new_rev = $revisions->get_next_revision($rev, (bool) vars::post('change_major', 'wikiedit'));
         $history = $revisions->get_revision_history($rows[0]['cont_ident']);
         $history = $revisions->add_revision_history($history, $new_rev, $store, trim(vars::post('change_desc', 'wikiedit')));
         $revisions->store_revision_history($item, $history);
         // attempt the update
         $query = "UPDATE {$db_prefix}content SET\n                  cont_title = " . $db->quote(vars::post('page_title', 'wikiedit'), 'text') . ",\n                  cont_ident = " . $db->quote(vars::post('page_tag', 'wikiedit'), 'text') . ",\n                  cont_revision = " . $db->quote($new_rev, 'text') . ",\n                  cont_timestamp = " . $db->quote(time(), 'integer') . ",\n                  cont_content = " . $db->quote(trim(vars::post('page_content', 'wikiedit')), 'text') . ",\n                  cont_parent_id = " . $db->quote(trim(vars::post('parent_ident', 'wikiedit')), 'integer') . "\n                  WHERE cont_ident = " . $db->quote(vars::post('old_tag', 'wikiedit'), 'text');
         $db->query($query);
     } else {
         $cont_id = $db->nextId('cont_id ');
         $query = "INSERT INTO {$db_prefix}content (cont_id, cont_ident, cont_timestamp, cont_content, cont_title, cont_parent_id) VALUES ({$cont_id}, " . $db->quote(vars::post('page_tag', 'wikiedit'), 'text') . ", " . $db->quote(time(), 'integer') . ", " . $db->quote(vars::post('page_content', 'wikiedit'), 'text') . ", " . $db->quote(vars::post('page_title', 'wikiedit'), 'text') . ", " . $db->quote(vars::post('parent_ident', 'wikiedit'), 'integer') . ")";
         $db->query($query);
     }
     $tag = vars::post('page_tag', 'wikiedit');
     $page = rewrite("?page={$tag}");
     $cache->clear("wcontent_");
     $cache->clear("content_pages_");
     // header("Location: {$page}");
 }
 $query = "SELECT cont_id, cont_ident, cont_title FROM {$db_prefix}content ORDER BY cont_ident";
 $result = $db->query($query);
 $rows = $result->fetchAll(MDB2_FETCHMODE_ASSOC);
 $result->free();
 foreach ($rows as $tag_item) {
     $pages[] = array('value' => $tag_item['cont_id'], 'title' => $tag_item['cont_ident']);
     if ($tag_item['cont_ident'] == "home_page") {
         $home_id = $tag_item['cont_id'];
     }
 }
Example #20
0
function tpl__list()
{
    global $page;
    ?>
        <!-- 列表开始 -->
        <div class="mt10"> 现在位置:广告位列表界面</div>
        <div>
            <form action="" name="form_order" method="post">
            <table class="tb mt10">
                <tr>
                    <th width="80"><a href="javascript:void(0);" onclick="C.form.check_all('.cklist');">全选/反选</a></th>
                    <th align='center' width="200" >广告位名称</th>
                    <th align='center'>广告位类型</th>
                    <th align='center'>广告位备注</th>
                    <th align='center'>创建时间</th>
                    <th width="150"></th>
                </tr>
                <?php 
    foreach ($page['list'] as $k => $v) {
        ?>
                <tr>   
                    <td><input type="checkbox" class="cklist" value="<?php 
        echo $v['area_id'];
        ?>
" /></td>
                    <td><?php 
        echo $v['area_name'];
        ?>
</td>
                    <td><?php 
        echo vars::get_field_str('ad_type', $v['area_type']);
        ?>
</td>
                    <td><?php 
        echo $v['remark'];
        ?>
</td>
                    <td><?php 
        echo date("Y-m-d H:m:s", $v['create_time']);
        ?>
</td>
                    <td>
                        <?php 
        echo show_button(array('class' => 'but2 but2s but2r', 'onclick' => "nlink_del('" . $v['area_id'] . "')", 'text' => '删除', 'level' => 'H0304'));
        echo show_button(array('class' => 'but2 but2s but2o', 'href' => "nlink.php?m=add&nid=" . $v['area_id'] . "", 'text' => '编辑', 'level' => 'H0303'));
        echo show_button(array('class' => 'but2 but2s', 'href' => "ad.php?m=ad_list&area_id=" . $v['area_id'] . "", 'text' => '管理广告', 'level' => 'H0301'));
        ?>
                    </td>
                </tr>
                <?php 
    }
    ?>
            </table>
            </form>

            <div class="pagebar clearfix">
  	            <?php 
    print_r($page['pagebar']['pagecode']);
    ?>
  
            </div>
        </div>
        <!-- 列表结束 -->
        <?php 
}
Example #21
0
function tpl__list()
{
    global $page, $c_obj, $area_obj;
    ?>
        <div class="mt10">
            <table class="tb" >
                <tr>
                    <th width="80"><a href="javascript:void(0);" onClick="C.form.check_all('.infoff');">全选/反选</a></th>
                    <th align='center' width="50">排序</th>
                    <th align='center' width="70">ID</th>
                    <th class="alignleft">标题</th>
                    <th width="60">状态</th>
                    <th width="60">浏览</th>
                    <th width="40">评论</th>
                    <th width="80">编辑</th>
                    <th></th>
                </tr>

               <?php 
    foreach ($page['list'] as $r) {
        $state = isset($_GET['state']) ? $_GET['state'] : '0';
        $r['recommend'] = $area_obj->get_all(' where id_list');
        ?>
                <tr info_title="">
                    <td><input type="checkbox" class="cklist infoff" value="<?php 
        echo $r['info_id'];
        ?>
" /></td>
                    <td><input type="text" size="2" value="<?php 
        echo $r['info_order'];
        ?>
" class="infoorder" pid="<?php 
        echo $r['info_id'];
        ?>
" /></td>
                    <td><?php 
        echo $r['info_id'];
        ?>
</td>
                    <td class="alignleft info_title">
                    <div style="width:300px;height:20px;overflow:hidden;">
                    <?php 
        echo '<a href="?state=' . $state . '&cate_id=' . $r['last_cate_id'] . '" style="color:#aaa;">' . $c_obj->categories[$r['last_cate_id']]['cname'] . '</a>';
        ?>
&nbsp;&nbsp;
                    <?php 
        if ($r['info_img'] != '') {
            echo '<img src="' . $r['info_img'] . '" height="20" width="20"> ';
        }
        if ($r['info_url'] != '') {
            echo '<font color=blue>[跳转] </font>';
        }
        ?>
                    <a target="_blank" href="<?php 
        // echo $r['surl'];
        ?>
" > 
                    <?php 
        echo $r['info_title'];
        ?>
</a></div>
                    </td>
                    <td><?php 
        echo vars::get_field_str('info_state', $r['info_state'], '');
        ?>
</td>
                    <td><?php 
        echo $r['info_visitors'];
        ?>
</td>
                    <td><?php 
        echo $r['info_comments'];
        ?>
</td>
                    <td><div style="width:80px;overflow:hidden;"><?php 
        echo $r['uname'];
        ?>
</div></td>
                    <td>
                        <?php 
        echo show_button(array('class' => 'but2 but2s but2r', 'onclick' => "del({$r['info_id']});", 'text' => '删除', 'level' => 'C0202'));
        echo show_button(array('class' => 'but2 but2s', 'href' => "info.php?m=add&info_id={$r['info_id']}", 'text' => '编辑', 'level' => 'C0201'));
        echo show_button(array('class' => 'but2 but2s but2o', 'onclick' => "add_comment_show({$r['info_id']});", 'text' => '评论', 'level' => 'C0106'));
        echo show_button(array('class' => 'but2 but2s but2o1', 'onclick' => "relevance('{$r['info_id']}');", 'text' => '关联', 'level' => 'C0101'));
        $text = $r['info_state'] == 1 ? '审核' : '屏蔽';
        echo show_button(array('class' => 'but2 but2s but2o', 'onclick' => "pass({$r['info_id']});", 'text' => $text, 'level' => 'C0204'));
        ?>

                    </td>
                </tr>
               <?php 
    }
    ?>
            </table>
            <div class="pagebar clearfix"><?php 
    echo $page['pagebar']['pagecode'];
    ?>
</div>
        </div>
        <?php 
}
Example #22
0
            <td>邮  箱:</td>
            <td><input type="text" id="uemail" class="ipt" value="" style="width:200px;"> * 如果填写请按邮箱格式</td>
        </tr>
		<tr>
            <td>Q   Q:</td>
            <td><input type="text" id="uqq" class="ipt" value="" style="width:200px;"></td>
        </tr>
		<tr>
            <td>手  机:</td>
            <td><input type="text" id="uphone" class="ipt" value="" style="width:200px;"></td>
        </tr>
		<tr>
            <td>会员状态:</td>
            <td>
				<?php 
echo vars::input_str(array('node' => 'ustate', 'type' => 'radio', 'default' => '0'));
?>
			</td>
        </tr>
        <tr>
            <td>会员积分:</td>
            <td><input type="text" id="upoint" class="ipt" value="" style="width:200px;"></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td colspan="2" style="">
			<?php 
echo show_button(array('class' => 'but2 ml5', 'onclick' => "user_edit();", 'text' => '确 定', 'level' => 'E0102'));
?>
			</td>
        </tr>
Example #23
0
        die("Schema Update Error.");
    }
    $cache->set("schema_modified", filemtime("{$input_file}.xml"));
}
require_once path::file("classes") . "content_class.php";
$content = new content_handling();
require_once path::file("classes") . "page_handling_class.php";
$page_handler = new page_hander();
require_once path::file("classes") . "users_class.php";
// Initiate session handler class
$session_options = array('db_object' => &$db);
require_once path::file("classes") . "session_class.php";
$sessions =& new session_handler($session_options);
if ($_POST['login']) {
    $user_password = md5(vars::post('userpass', 'login'));
    $user_name = preg_replace("#\\W#", "", vars::post('username', 'login'));
    $query = "SELECT * FROM {$db_prefix}users\n\t\t\t\tWHERE name = " . $db->quote($user_name, 'text') . "\n\t\t\t\tAND user_password = "******"Location: {$_SERVER['PHP_SELF']}" . ($_SERVER['QUERY_STRING'] ? "?{$_SERVER['QUERY_STRING']}" : ""));
    exit;
}
Example #24
0
                <th>真实姓名</th>
                <th>邮箱</th>
                <th>手机</th>
                <th>管理组</th>
                <th>用户状态</th>
                <th>开通时间</th>
                <th width="180" class="alignleft"></th>
            </tr>
            <?php 
if (count($page['admins']['list'] > 0)) {
    foreach ($page['admins']['list'] as $ka => $va) {
        $action = $va['astate'] == 0 ? "停用" : "启用";
        if ($va['astate'] == 0) {
            $ustate = "<font color=green>" . vars::get_field_str('ustate', $va['astate'], 'html') . "</font>";
        } else {
            $ustate = "<font color=red>" . vars::get_field_str('ustate', $va['astate'], 'html') . "</font>";
        }
        ?>
            <tr>
                <td><input type="checkbox" value="<?php 
        echo $va['admin_id'];
        ?>
" class="cklist"></td> 
                <td><?php 
        echo $va['admin_id'];
        ?>
</td>
                <td><?php 
        echo $va['aname'];
        ?>
</td>
Example #25
0
function tpl__list()
{
    global $page;
    ?>
                <table class="tb mt10">
                <tr>
                    <th width="80"><a href="javascript:void(0);" onclick="C.form.check_all('.cklist');">全选/反选</a></th> 
                    <th>账号ID</th>
                    <th>账号</th>
                    <th>真实姓名</th>
                    <th>邮箱</th>
                    <th>手机</th>
                    <th>用户状态</th>
                    <th>开通时间</th>
                    <th width="170" class="alignleft"></th>
                </tr>
                <?php 
    if (count($page['list'] > 0)) {
        foreach ($page['list'] as $kay => $val) {
            $msg_state = $val['astate'] == 0 ? 1 : 0;
            ?>
                <tr>
                    <td><input type="checkbox" value="<?php 
            echo $val['admin_id'];
            ?>
" class="cklist"></td> 
                    <td><?php 
            echo $val['admin_id'];
            ?>
</td>
                    <td><?php 
            echo $val['aname'];
            ?>
</td>
                    <td><?php 
            echo $val['aname_true'];
            ?>
</td>
                    <td><?php 
            echo $val['aemail'];
            ?>
</td>
                    <td><?php 
            echo $val['aphone'];
            ?>
</td>
                    <td><?php 
            ?>
</td>
                    <td><?php 
            echo date("Y-m-d H:m:s", $val['reg_date']);
            ?>
</td>
                    <td>
                    <?php 
            echo show_button(array('class' => 'but2 but2s', 'href' => "admin.php?m=add&aid={$val['admin_id']}", 'text' => '编辑', 'level' => 'B0501'));
            echo show_button(array('class' => 'but2 but2s but2o1', 'href' => "level.php?search_type=admin_list&search_value={$val['admin_id']}", 'text' => '编辑权限', 'level' => 'B0302'));
            echo show_button(array('class' => 'but2 but2s but2o', 'onclick' => "update_state({$val['admin_id']},{$val['astate']})", 'text' => vars::get_field_str("ustate_a", $msg_state), 'level' => 'B0503'));
            ?>
                    </td>
                </tr>
                <?php 
        }
    }
    ?>
    
            </table>
            <!--分页码-->
            <div class="pagebar">
                <?php 
    echo $page['pagebar']['pagecode'];
    ?>
            </div>
            <?php 
}
Example #26
0
function tpl__list()
{
    global $page;
    ?>
            <table class="tb mt10">
                <tr>
                    <th width="80"><a href="javascript:void(0);" onclick="C.form.check_all('.cklist');">全选/反选</a></th> 
                    <th>管理员组</th>
                    <th>状态</th>
                    <th>备注</th>
                    <th>创建时间</th>
                    <th width="160" class="alignleft"></th>
                </tr>
                <?php 
    foreach ($page['list'] as $kay => $val) {
        $msg_state = $val['g_state'] == 0 ? 1 : 0;
        ?>
                <tr>
                    <td><input type="checkbox" value="<?php 
        echo $val['group_id'];
        ?>
" class="cklist"></td> 
                    <td><?php 
        echo $val['g_name'];
        ?>
</td>
                    <td><?php 
        echo vars::get_field_str("ustate", $val['g_state']);
        ?>
</td>
                    <td><?php 
        echo $val['g_remark'];
        ?>
</td>
                    <td><?php 
        echo date("Y-m-d H:m:s", $val['create_time']);
        ?>
</td>
                    <td>
                    <?php 
        echo show_button(array('class' => 'but2 but2s', 'href' => "admin_group.php?m=add&gid={$val['group_id']}", 'text' => "编辑", 'level' => 'B0102'));
        echo show_button(array('class' => 'but2 but2s but2o1', 'href' => "level.php?search_type=admin_group&search_value={$val['group_id']}", 'text' => "编辑权限", 'level' => 'B0404'));
        echo show_button(array('class' => 'but2 but2s but2o', 'href' => "javascript:void(0);", 'onclick' => "update_state({$val['group_id']},{$val['g_state']})", 'text' => vars::get_field_str("ustate_a", $msg_state), 'level' => 'B0403'));
        ?>
                    </td>
                </tr>
                <?php 
    }
    ?>
    
            </table>
            <!--分页码-->
            <div class="pagebar">
                <?php 
    echo $page['pagebar']['pagecode'];
    ?>
            </div>
            <?php 
}
Example #27
0
        echo $menu_id;
        ?>
">
                    <input id="menu_order" type="text" class="ipt" style="width:35px" value="<?php 
        echo $menu_order;
        ?>
">
                </td>
                <td class="alignleft">  <img src="pc/css/img/www_link.png">
                &nbsp;&nbsp;<input id="menu_name" type="text" class="ipt" value="<?php 
        echo $menu_name;
        ?>
" style="width:125px"></td>
                <td>
                    <?php 
        echo vars::input_str(array('node' => 'wx_menu_type', 'type' => 'select', 'default' => $menu_type));
        ?>
                    <select id="cate_id" onchange="set_url(this);">
                        <option value="0" >==快速选择分类==</option>
                        <?php 
        $c->html_cate_select($c->cate_tree(), 0, '', '');
        ?>
                    </select>
                </td>
                <td><input id="menu_key_url" type="text" class="ipt" value="<?php 
        echo $menu_key_url;
        ?>
" style="width:300px"></td>
                <td>
                    <a class="but2 but2o" href="javascript:void(0);" onclick="menu_save('<?php 
        echo $i . $j;
Example #28
0
 function get($args)
 {
     $this->validate($args);
     return vars::apply_assoc($this->expression, $args, true);
 }
Example #29
0
        $extern_id = $filed_list['extern_id'];
        ?>
                   <tr>
						<?php 
        $i = 0;
        foreach ($val as $kk => $vv) {
            if ($i > 8) {
                break;
            }
            if (is_upload($_GET['extern_id'], $kk) && $vv != '') {
                $vv = '<img width="50" height="50" src="' . $vv . '">';
            } elseif ($i == 0) {
                $vv = '<center>' . helper::utf8_substr($vv, 0, 11) . '</center>';
            } elseif ($i == 1) {
                $action = $vv == 0 ? "屏蔽" : "通过";
                $vv = vars::get_field_str('is_check', $vv, 'html');
            } elseif ($i == 2) {
                $vv = date("Y-m-d H:i:s", $vv);
            } else {
                //$vv = helper :: utf8_substr($vv, 0, 10);
            }
            if (date_type($_GET['extern_id'], $kk)) {
                $vv = date("Y-m-d", intval($vv));
            }
            if ($i == 0) {
                ?>
						 <td><input type="checkbox" value="<?php 
                echo strip_tags($vv);
                ?>
" class="cklist"></td> 
						 <?php 
Example #30
0
</a></div>
                                <?php 
    if (isset($r['recommend']) && count($r['recommend']) > 0) {
        echo '<div style="border-top:1px dotted #ccc;margin-top:5px;color:#888;">[推荐] ';
        foreach ($r['recommend'] as $k => $v) {
            echo '<a href="javascript:void(0);" style="color:orange;" onclick="esc_recommend(' . $r['info_id'] . ',' . $v['area_id'] . ');" title="点击取消“' . $v['title'] . '”推荐位">' . $v['title'] . '</a>';
            if ($k < count($r['recommend']) - 1) {
                echo ' , ';
            }
        }
        echo '</div>';
    }
    ?>
                                </td>
                                <td><?php 
    echo vars::get_field_str('info_state', $r['info_state'], '');
    ?>
</td>
                                <td><?php 
    echo $r['resource_total'];
    ?>
</td>
                                <td><?php 
    echo $r['info_visitors'];
    ?>
</td>
                                <td title="<?php 
    echo date('Y-m-d H:i:s', $r['publish_time']);
    ?>
" ><?php 
    if (strtotime(date('Y-m-d', time())) <= $r['publish_time']) {