예제 #1
0
function p_htmlentities($string)
{
    $encoding = 'utf-8';
    if (strtolower(CHARSET) == 'gbk') {
        return safe_htm($string);
    } else {
        return htmlentities($string, ENT_QUOTES, $encoding);
    }
}
예제 #2
0
 public function create_index()
 {
     $pagesize = isset($GLOBALS['pagesize']) ? intval($GLOBALS['pagesize']) : 1;
     $page = isset($GLOBALS['page']) ? intval($GLOBALS['page']) : 1;
     $where = array();
     $page = max($page, 1);
     if ($page == 1) {
         $this->delete_index();
     }
     $sql = " select  ";
     $sql .= "  gc.id, m.m, gc.modelid, gc.name, gc.remark, gc.sort, m.name as model_name ";
     $sql .= " from " . $this->db->tablepre . "search_category gc ";
     $sql .= " left join " . $this->db->tablepre . "model m ";
     $sql .= "    on m.modelid = gc.modelid ";
     $sql .= " order by gc.sort asc, gc.id desc";
     //get sql count
     $count = $this->db->get_page_list_count($sql, $where);
     $pages = pages($count, $page, $pagesize);
     //get sql page list
     $result = $this->db->get_page_list($sql, $where, $page, $pagesize);
     foreach ($result as $row) {
         //TODO:
         // query content
         $data = array();
         $data['m'] = $row['m'];
         $data['keyid'] = $row['modelid'];
         $data['data_id'] = '';
         $data['full_title'] = '';
         $data['data'] = '好久没有在家里鼓捣代码了';
         $data['title'] = $row['name'];
         $data['remark'] = '';
         $data['url'] = '';
         $data['thumb'] = '';
         $data['updatetime'] = gmdate('Y-m-d H:i:s', time() + 3600 * 8);
         $this->searchapi->add($data);
     }
     $this->msg = '索引重建完毕';
     MSG(safe_htm($this->msg));
 }
예제 #3
0
파일: list.php 프로젝트: jackycgq/wuzhicms
?>
                                        <?php 
$n = 1;
if (is_array($rs)) {
    foreach ($rs as $r) {
        ?>
                                        <li><a href="<?php 
        echo $r['url'];
        ?>
">
                                            <div class="newstitle"><h3><?php 
        echo safe_htm($r['title']);
        ?>
</h3></div></a>
                                            <p><?php 
        echo safe_htm(strcut(strip_tags($r['content']), 100));
        ?>
.</p>
                                        </li>
                                        <?php 
        $n++;
    }
}
?>
                                        <?php 
if (defined('IN_ADMIN') && !defined('HTML')) {
    echo '</div>';
}
?>
                                    </ul>
                                </div>
예제 #4
0
 public function edit()
 {
     $blockid = intval($GLOBALS['blockid']);
     if (isset($GLOBALS['submit'])) {
         $formdata = array();
         $formdata['type'] = intval($GLOBALS['type']);
         $formdata['modelid'] = intval($GLOBALS['modelid']);
         $formdata['codetype'] = intval($GLOBALS['codetype']);
         $formdata['name'] = remove_xss($GLOBALS['form']['name']);
         $formdata['max_number'] = 500;
         if ($formdata['type'] == 1) {
             $code = $GLOBALS['form']['template_code'];
         } elseif ($formdata['type'] == 2) {
             $code = $GLOBALS['form']['code'];
         } elseif ($formdata['type'] == 3) {
             $formdata['url'] = safe_htm($GLOBALS['form']['rssurl']);
             $code = $GLOBALS['form']['template_code'];
         } elseif ($formdata['type'] == 4) {
             $formdata['url'] = safe_htm($GLOBALS['form']['jsonurl']);
             $code = $GLOBALS['form']['template_code'];
         }
         $formdata['createhtml'] = intval($GLOBALS['createhtml']);
         $formdata['updatetime'] = SYS_TIME;
         $formdata['timing'] = SYS_TIME + 3600;
         $formdata['status'] = 9;
         //替换 #wz#
         if ($formdata['type'] == 1) {
             $str = 'type="1" blockid="' . $blockid . '"';
         } elseif ($formdata['type'] == 2) {
             $str = 'type="2" blockid="' . $blockid . '"';
         } elseif ($formdata['type'] == 3) {
             $str = 'type="3" blockid="' . $blockid . '" url="' . $formdata['url'] . '"';
         } elseif ($formdata['type'] == 4) {
             $str = 'type="4" blockid="' . $blockid . '" url="' . $formdata['url'] . '"';
         }
         $formdata['code'] = addslashes(str_replace('#wz#', $str, $code));
         $this->db->update('block', $formdata, array('blockid' => $blockid));
         set_cache('block_' . $blockid, $formdata, 'block');
         //生成静态
         if ($formdata['createhtml']) {
             $GLOBALS['blockids'] = array($blockid);
             $this->html(0);
         }
         MSG(L('edit success'), HTTP_REFERER);
     } else {
         $show_formjs = 1;
         $form = load_class('form');
         $r = $this->db->get_one('block', array('blockid' => $blockid));
         $r['code'] = stripslashes($r['code']);
         $models = $this->db->get_list('model', '', '*', 0, 100, 0, 'modelid ASC');
         include $this->template('block_edit');
     }
 }
예제 #5
0
                            <td><?php 
    echo $r['orderid'];
    ?>
</td>
                            <td><img src="<?php 
    echo $r['thumb'];
    ?>
" onclick="view('<?php 
    echo $r['orderid'];
    ?>
','<?php 
    echo $mr['username'];
    ?>
)" style="max-width: 50px;max-height: 50px;"></td>
                            <td><?php 
    echo '<a href="' . $r['url'] . '" target="_blank">' . safe_htm($r['remark']) . '</a>';
    ?>
</td>
                            <td><?php 
    echo $r['point'];
    ?>
</td>
                            <td><?php 
    echo time_format($r['addtime']);
    ?>
</td>
                            <td><?php 
    echo time_format($r['post_time']);
    ?>
</td>
                            <td><?php 
예제 #6
0
    $pages = $content_template_parse->pages;
    $number = $content_template_parse->number;
}
?>
            <?php 
$n = 1;
if (is_array($rs)) {
    foreach ($rs as $r) {
        ?>
            <li>
                <div class="bl">
                    <div><a href="<?php 
        echo $r['url'];
        ?>
"><?php 
        echo safe_htm($r['title']);
        ?>
</a></div>
                    <div><span class="nums"><?php 
        echo $categorys[$r['cid']]['name'];
        ?>
</span><span class="times"><?php 
        echo date('Y-m-d', $r['updatetime']);
        ?>
</span></div>
                </div>
                <?php 
        if ($r['thumb']) {
            ?>
<div class="mimg"><a href="<?php 
            echo $r['url'];
예제 #7
0
    $rs = $tags_template_parse->listing(array('letter' => $letter, 'order' => 'number DESC', 'start' => '0', 'pagesize' => '10', 'page' => $page));
    $pages = $tags_template_parse->pages;
    $number = $tags_template_parse->number;
}
$n = 1;
if (is_array($rs)) {
    foreach ($rs as $r) {
        ?>
<li><?php 
        echo $r[tid];
        ?>
 <a href="<?php 
        echo $r[url];
        ?>
"><?php 
        echo safe_htm($r['tag']);
        ?>
</a>(<?php 
        echo $r['number'];
        ?>
)</li>
<?php 
        $n++;
    }
}
if (defined('IN_ADMIN') && !defined('HTML')) {
    echo '</div>';
}
?>

예제 #8
0
defined('IN_WZ') or exit('No direct script access allowed');
include $this->template('header', 'core');
?>
<body>

<section class="panel">
    <div class="panel-body">
        <form class="form-horizontal tasi-form" method="post" action="">
        <div class="form-group">
          <div class="col-sm-2">
          订单号:<?php 
echo safe_htm($r['order_no']);
?>
            名称:<?php 
echo safe_htm($r['payname']);
?>
          </div>
        </div>

        <div class="form-group">
            <div class="col-sm-2">
                金额: <input  type="text" name="money" value="0.00" > <input type="radio" name="type" value="1" checked> 减少 <input type="radio" name="type" value="0"> 增加
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-2"><input class="btn btn-info" type="submit" name="submit" value="提交"></div>
        </form>
    </div>
</section>
예제 #9
0
                        <th>支付方式</th>
                        <th>状态</th>
                        <th width="152">管理操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php 
foreach ($result as $r) {
    ?>
                        <tr>
                            <td><?php 
    echo time_format($r['addtime']);
    ?>
</td>
                            <td><?php 
    echo "<a href='?m=pay&f=index&v=view&id=" . $r['id'] . $this->su() . "'>" . safe_htm($r['payname']) . "</a>";
    ?>
</a></td>
                            <td><?php 
    echo $r['order_no'];
    ?>
</td>
                            <td><?php 
    echo $r['username'];
    ?>
</td>
                            <td style="font-weight: 700;"><?php 
    if ($r['plus_minus'] == 1) {
        echo "<font color='green'>+" . $r['money'] . "</font>";
    } elseif ($r['plus_minus'] == -1) {
        echo "<font color='#f37800'>-" . $r['money'] . "</font>";
예제 #10
0
        ?>
</td>
                            <td><?php 
        echo safe_htm($r['name']);
        ?>
</td>
                            <td><?php 
        echo $r['m'];
        ?>
</td>
                            <td><?php 
        echo $r['model_name'];
        ?>
</td>
                            <td><?php 
        echo safe_htm($r['remark']);
        ?>
</td>
                            <td>
                                <a href="javascript:void(0)" onclick="edit(<?php 
        echo $r['id'];
        ?>
)" class="btn btn-primary btn-xs">修改</a>
                                <a href="javascript:void(0)" onclick="del(<?php 
        echo $r['id'];
        ?>
)" class="btn btn-danger btn-xs">删除</a>
                            </td>
                        </tr>
                    <?php 
    }
예제 #11
0
                        <th class="tablehead">联系电话</th>
                        <th class="tablehead">用户地理位置</th>
                        <th class="tablehead">管理操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php 
foreach ($result as $r) {
    ?>
                        <tr>
                            <td><?php 
    echo $r['id'];
    ?>
</td>
                            <td><?php 
    echo "<a href='index.php?m=guestbook&f=index&v=reply&id=" . $r['id'] . $this->su() . "'>" . safe_htm($r['title']) . "</a>";
    ?>
</a></td>
                            <td><?php 
    echo time_format($r['addtime']);
    ?>
</td>
                            <td><?php 
    echo $r['status'];
    ?>
</td>
                            <td><?php 
    echo $r['linkman'];
    ?>
</td>
                            <td><?php 
예제 #12
0
</td>
                            <td><a href="javascript:void(0)" onclick="view('<?php 
        echo $r['orderid'];
        ?>
','<?php 
        echo $mr['username'];
        ?>
')" ><img src="<?php 
        echo $r['thumb'];
        ?>
" style="max-width: 50px;max-height: 50px;"></td>
                            <td style="max-width: 250px;"><?php 
        $coupon_card = 0;
        foreach ($r['goodlist'] as $rs) {
            $coupon_card += $rs['coupon_card'];
            echo '<a href="' . $rs['url'] . '" target="_blank">' . safe_htm($rs['remark']) . '</a> (' . $r['quantity'] . ')<br>';
        }
        ?>
</td>
                            <td><?php 
        echo $r['money'];
        if ($coupon_card) {
            echo '<br>券:' . $coupon_card;
        }
        ?>
</td>
                            <td><?php 
        echo time_format($r['addtime']);
        ?>
 <br><?php 
        echo time_format($r['post_time']);
예제 #13
0
foreach ($result as $r) {
    ?>
                        <tr>
                            <td><input name="sorts[<?php 
    echo $r['id'];
    ?>
]" type="text" class="center" style="padding:3px" value="<?php 
    echo $r['sort'];
    ?>
" size="3"></td>
                            <td><?php 
    echo $r['id'];
    ?>
</td>
                            <td><?php 
    echo "<a href='index.php?m=affiche&f=index&v=show&id=" . $r['id'] . "' target='_blank' style='" . $r['css'] . "'>" . safe_htm($r['title']) . "</a>";
    ?>
</a></td>
                            <td><?php 
    echo time_format($r['addtime']);
    ?>
</td>
                            <td><?php 
    echo time_format($r['endtime']);
    ?>
</td>
                            <td><?php 
    echo $status_arr[$r['status']];
    ?>
</td>
                            <td><?php