Пример #1
0
 public function ask()
 {
     $formdata = array();
     $formdata['title'] = isset($GLOBALS['title']) ? remove_xss($GLOBALS['title']) : strcut($GLOBALS['content'], 80);
     $formdata['content'] = $GLOBALS['content'];
     $formdata['addtime'] = SYS_TIME;
     $formdata['publisher'] = $this->memberinfo['username'];
     $formdata['ip'] = get_ip();
     $this->db->insert('guestbook', $formdata);
     MSG('您的提问已经提交,我们的专家会尽快给您回复', '?m=guestbook&f=myissue&v=listing');
 }
			<td align="left"><?php 
        echo $t['type'];
        ?>
</td>
			<td align="left"><a href="<?php 
        echo url('admin/index/attack', array('ip' => $t['ip']));
        ?>
"><?php 
        echo $t['ip'];
        ?>
</a></td>
			<td align="left"><a href="javascript:view_<?php 
        echo $k;
        ?>
();"><?php 
        echo strcut(htmlspecialchars($t['url']), 50);
        ?>
</a></td>
		</tr>
		<?php 
    }
}
?>
		<tr height="25">
			<td colspan="8" align="left"><input type="button" class="button" value="<?php 
echo lang('a-ind-44');
?>
" name="submit_order" onClick="window.location.href='<?php 
echo url('admin/index/clearattack/');
?>
'">
Пример #3
0
    foreach ($lastlist as $n => $r) {
        if ($nums > 10) {
            break;
        }
        if (!isset($categorys[$r['cid']])) {
            continue;
        }
        $nums++;
        ?>
                            <tr>
                                <td><?php 
        echo $categorys[$r['cid']]['name'];
        ?>
</td>
                                <td><?php 
        echo "<a href='" . $r['url'] . "' target='_blank'>" . strcut($r['title'], 40, '..') . "</a>";
        ?>
</td>
                                <td class="col-md-4">
                                    <?php 
        echo time_format($r['addtime']);
        ?>
                                </td>
                            </tr>
                        <?php 
    }
}
?>
                        </tbody>
                    </table>
                </div>
Пример #4
0
?>
                                        <?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>
Пример #5
0
        ?>
</a></div>
            <div class="Nbd"><?php 
        if ($r['thumb']) {
            ?>
<a href="<?php 
            echo $r['url'];
            ?>
"><img src="<?php 
            echo $r['thumb'];
            ?>
"></a><?php 
        }
        ?>
                <p><?php 
        echo str_replace($keywords, "<font color='#C00'>" . $keywords . "</font>", strcut($r['remark'], 160));
        ?>
</p>
              </div>
            <div class="Nfoot">
                <div class="lwd">发布时间:<?php 
        echo date('Y年m月d日 H:i', $r['addtime']);
        ?>
</div>
              </div>
          </div>
<?php 
        $n++;
    }
}
?>
Пример #6
0
                                ?>
" class="list-group-item_g"><?php 
                                echo strcut($r['title'], 36);
                                ?>
</a>
                            <?php 
                            } else {
                                ?>
                            <a href="<?php 
                                echo $r['url'];
                                ?>
" class="list-group-item_g"><span class="badge"><?php 
                                echo date('y-d', $r['addtime']);
                                ?>
</span>· <?php 
                                echo strcut($r['title'], 32);
                                ?>
</a><?php 
                            }
                            $n++;
                        }
                    }
                    ?>
                            <?php 
                    if (defined('IN_ADMIN') && !defined('HTML')) {
                        echo '</div>';
                    }
                    ?>
                        </div>
                    </div>
                </div>
Пример #7
0
                                        <tr>
                                            <td class="orderlist"><?php 
        echo $r['orderid'];
        ?>
</td>
                                            <td class="orderlist"><a href="<?php 
        echo $r['url'];
        ?>
" target="_blank"><div class="orderproimg"><img src="<?php 
        echo $r['thumb'];
        ?>
" title="<?php 
        echo $r['remark'];
        ?>
"><span><?php 
        echo strcut($r['remark'], 30);
        ?>
</span></div></a></td>
                                            <td class="orderlist"><?php 
        echo date('Y-m-d H:i', $r['addtime']);
        ?>
</td>
                                            <td class="orderlist"><?php 
        echo $status[$r['status']];
        ?>
</td>
                                            <td class="orderlist"><?php 
        echo $r['point'];
        ?>
</td>
                                        </tr>
Пример #8
0
 /**
  * 添加、修改内容数据
  */
 public function set($id, $tablename, $data)
 {
     $id = intval($id);
     if (!$this->is_table_exists($tablename)) {
         return lang('m-con-37', array('1' => $tablename));
     }
     $table = Controller::model($tablename);
     //加载附表Model
     if (empty($data['catid'])) {
         return lang('m-con-8');
     }
     $_data = $id ? $this->find($id) : null;
     //数组转化为字符
     foreach ($data as $i => $t) {
         if (is_array($t)) {
             $data[$i] = array2string($t);
         }
     }
     //描述截取
     if (empty($data['description']) && isset($data['content'])) {
         $len = isset($data['fn_add_introduce']) && $data['fn_add_introduce'] && $data['fn_introcude_length'] ? $data['fn_introcude_length'] : 200;
         $data['description'] = str_replace(array(PHP_EOL, '  '), array('', ''), strcut(clearhtml($data['content']), $len));
     }
     //下载远程图片
     if (isset($data['content']) && isset($data['fn_down_image']) && $data['fn_down_image']) {
         $content = str_replace(array('\\', '"'), array('', '\''), htmlspecialchars_decode($data['content']));
         if (preg_match_all("/(src)=([\"|']?)([^ \"'>]+\\.(gif|jpg|jpeg|bmp|png))\\2/i", $content, $imgs)) {
             $userid = !$data['sysadd'] && $data['userid'] ? $data['userid'] : (!$_data['sysadd'] && $_data['userid'] ? $_data['userid'] : 0);
             $sysadd = $data['sysadd'] ? $data['sysadd'] : ($_data['sysadd'] ? $_data['sysadd'] : 0);
             if ($userid) {
                 //表示会员投稿
                 $member = $this->execute("select groupid from {$this->prefix}member where id=" . $userid, false);
                 $group = $this->execute("select * from {$this->prefix}member_group where id=" . (int) $member['groupid'], false);
                 $result = $this->download_images($imgs[3], $userid, (int) $group['filesize']);
             } elseif ($sysadd) {
                 //表示管理员投稿
                 $result = $this->download_images($imgs[3]);
             }
             if (isset($result) && $result) {
                 $image = $result['replace'][0];
                 $data['content'] = str_replace($result['regex'], $result['replace'], $data['content']);
             }
         }
     }
     //提取缩略图
     if (empty($data['thumb']) && isset($data['content']) && isset($data['fn_auto_thumb']) && $data['fn_auto_thumb']) {
         if (isset($image)) {
             $data['thumb'] = $image;
         } else {
             $content = str_replace(array('\\', '"'), array('', '\''), htmlspecialchars_decode($data['content']));
             if (preg_match("/(src)=([\"|']?)([^ \"'>]+\\.(gif|jpg|jpeg|bmp|png))\\2/i", $content, $img)) {
                 $data['thumb'] = $img[3];
             }
         }
     }
     //关键字处理
     if ($data['keywords']) {
         $data['keywords'] = str_replace(',', ',', $data['keywords']);
         $tags = @explode(',', $data['keywords']);
         if ($tags) {
             foreach ($tags as $t) {
                 $name = trim($t);
                 if ($name) {
                     $d = $this->from('tag', 'id')->where('name=?', $name)->select(false);
                     if (empty($d)) {
                         $this->query('INSERT INTO `' . $this->prefix . 'tag` (`name`,`letter`) VALUES ("' . $name . '", "' . word2pinyin($name) . '")');
                     }
                 }
             }
         }
     }
     $status = 1;
     //用于判断积分增加
     $is_add = 0;
     if ($id) {
         //修改
         if (empty($_data)) {
             $data['id'] = $id;
             $data['url'] = getUrl($data);
             //更新URL
             $data['status'] = 1;
             //插入时状态设置为1
             $this->insert($data);
             $table->insert($data);
             $is_add = 1;
         } else {
             $data['id'] = $data['id'] ? $data['id'] : $id;
             $data['url'] = getUrl($data);
             //更新URL
             unset($data['id']);
             $data['status'] = $data['status'] > 0 ? 1 : 0;
             //修改时,非0状态设置为1
             $this->update($data, 'id=' . $id);
             $table->update($data, 'id=' . $id);
             $status = 0;
             //修改时不作为积分处理
             $data['userid'] = $_data['userid'];
         }
     } else {
         //添加
         $data['id'] = $id = $this->get_content_id();
         if (empty($id)) {
             return lang('m-con-36');
         }
         $data['url'] = getUrl($data);
         //更新URL
         $data['status'] = 1;
         //插入时状态设置为1
         $this->insert($data);
         $table->insert($data);
         $is_add = 1;
     }
     //积分处理 非系统添加且(增加时,文档状态等于1)
     if (!$data['sysadd'] && $status == 1) {
         $this->credits($data['userid'], 1);
     }
     //处理内容扩展数据
     $this->set_extend_data($id, $data);
     // 添加数据的处理
     if ($is_add) {
         // 回调函数
         $table = str_replace($this->prefix, '', $table->table_name);
         $function = 'callback_' . $table;
         $file = MODEL_DIR . 'callback/' . $table . '.php';
         if (is_file($file)) {
             include_once $file;
             if (function_exists($function)) {
                 $function($data);
             }
         }
         // 执行任务表
         $table = $this->db->dbprefix . "sb";
         $this->db->query("CREATE TABLE IF NOT EXISTS `" . $table . "` (\n            `id` int(10) AUTO_INCREMENT NOT NULL,\n            `type` varchar(50) NOT NULL,\n            `value` text NOT NULL,\n            PRIMARY KEY (`id`),\n            KEY `type` (`type`)\n            ) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
         $this->db->insert($table, array('type' => 'content_add', 'value' => array2string($data)));
         // 推送微信
         $this->post_weixin($id);
     }
     return $id;
 }
Пример #9
0
    echo site_url('decoration/article/' . $v['id']);
    ?>
"><img src="<?php 
    echo UPLOAD_URL . tag_photo($v['photo']);
    ?>
" alt="" width="134" height="94"></a>
                <div class="nwstext">
                    <a href="<?php 
    echo site_url('decoration/article/' . $v['id']);
    ?>
"><h4><?php 
    echo strcut(strip_tags($v['title']), 30);
    ?>
</h4></a>
                    <p><?php 
    echo strcut(strip_tags($v['content']), 80);
    ?>
</p>
                    <div class="check"><a href="<?php 
    echo site_url('decoration/article/' . $v['id']);
    ?>
">查看详情</a></div>
                </div>
            </div>
            <?php 
}
?>
      </div>
      <div class="text-center">
        <?php 
echo $pages;
Пример #10
0
    ?>
                <li class="list"><a href="<?php 
    echo site_url('Cases/article/' . $v['id']);
    ?>
" class="img"><img src="<?php 
    echo UPLOAD_URL . tag_photo($v['photo']);
    ?>
" alt="" width="200" height="150" /></a>
                  <h3><a href="<?php 
    echo site_url('Cases/article/' . $v['id']);
    ?>
">【<?php 
    echo one_ctype($v['ctype'])['title'];
    ?>
】<?php 
    echo strcut(strip_tags($v['title']), 12);
    ?>
</a></h3>
                </li>
                <?php 
}
?>
              </ul>
            <div class="clear"></div>
		  </div>
		  <div class="text-center"><?php 
echo $pages;
?>
</div>
    </div>
    </div>
Пример #11
0
 /**
  * 附加
  */
 private function additionalAction($data)
 {
     $data['keywords'] = str_replace(array(',', ' '), ',', $data['keywords']);
     $content = htmlspecialchars_decode($data['content']);
     if (empty($data['description']) && isset($data['content']) && isset($data['xiao_auto_description'])) {
         $data['description'] = str_replace(array(' ', '  '), array('', ''), strcut(strip_tags($content), 200));
     }
     if (isset($data['content']) && $data['xiao_download_image'] && $this->site_config['site_download_image']) {
         if (preg_match_all("/(src)=([\"|']?)([^ \"'>]+\\.(gif|jpg|jpeg|bmp|png))\\2/i", $content, $imgs)) {
             $images = array_unique($imgs[3]);
             $regex = $replace = array();
             $path = 'data/upload/image/' . date('Ym') . '/';
             if (!is_dir(XIAOCMS_PATH . $path)) {
                 mkdirs(XIAOCMS_PATH . $path);
             }
             $image = xiaocms::load_class('image');
             foreach ($images as $img) {
                 if (strpos($img, SITE_URL) !== false || substr($img, 0, 7) != 'http://') {
                     continue;
                 }
                 $fileext = fileext($img);
                 $name = $path . md5($img . time()) . '.' . $fileext;
                 $content = @file_get_contents($img);
                 if (empty($content)) {
                     continue;
                 }
                 if (file_put_contents(XIAOCMS_PATH . $name, $content)) {
                     if ($this->site_config['site_watermark']) {
                         $image->watermark(XIAOCMS_PATH . $name, $this->site_config['site_watermark_pos']);
                     }
                 }
                 $regex[] = $img;
                 $replace[] = SITE_PATH . $name;
             }
         }
         $result = count($regex) > 0 ? array('regex' => $regex, 'replace' => $replace) : null;
         if (isset($result) && $result) {
             $image = $result['replace'][0];
             $data['content'] = str_replace($result['regex'], $result['replace'], $data['content']);
         }
     }
     if (empty($data['thumb']) && isset($data['content']) && isset($data['xiao_auto_thumb'])) {
         if (preg_match("<img.*src=[\"](.*?)[\"].*?>", htmlspecialchars_decode($data['content']), $regs)) {
             $data['thumb'] = $regs[1];
         }
     }
     return $data;
 }
                    <ul>
                        <?php 
            $return_m = $this->_listdata("catid={$cid} num=5 order=listorder_asc,inputtime_desc  return=m");
            extract($return_m);
            $count_m = count($return_m);
            if (is_array($return_m)) {
                foreach ($return_m as $key_m => $m) {
                    ?>
                        <li><b><a href="<?php 
                    echo $m['url'];
                    ?>
" title="<?php 
                    echo $m['title'];
                    ?>
"><?php 
                    echo strcut($m['title'], 60, '...');
                    ?>
</a></b><span>[<?php 
                    echo date('Y-m-d', $m['inputtime']);
                    ?>
]</span></li>
                        <?php 
                }
            }
            ?>
                    </ul>
                </div>
            <?php 
        }
    }
}
Пример #13
0
 protected function response_msg($data)
 {
     $str = '';
     if ($data['type'] == 'news') {
         $str .= '<xml>' . PHP_EOL;
         $str .= '<ToUserName><![CDATA[' . $data['to'] . ']]></ToUserName>' . PHP_EOL;
         $str .= '<FromUserName><![CDATA[' . $data['from'] . ']]></FromUserName>' . PHP_EOL;
         $str .= '<CreateTime>' . time() . '</CreateTime>' . PHP_EOL;
         $str .= '<MsgType><![CDATA[' . $data['type'] . ']]></MsgType>' . PHP_EOL;
         $str .= '<ArticleCount>' . (count($data['content']['orther']) + 1) . '</ArticleCount>' . PHP_EOL;
         $str .= '<Articles>' . PHP_EOL;
         $url = $data['content']['url'];
         $str .= '<item>' . PHP_EOL;
         $str .= '<Title><![CDATA[' . strcut($data['content']['title'], 28) . ']]></Title>' . PHP_EOL;
         $str .= '<Description><![CDATA[' . $data['content']['description'] . ']]></Description>' . PHP_EOL;
         $str .= '<PicUrl><![CDATA[' . getImage($data['content']['thumb']) . ']]></PicUrl>' . PHP_EOL;
         $str .= '<Url><![CDATA[' . $url . ']]></Url>' . PHP_EOL;
         $str .= '</item>' . PHP_EOL;
         if ($data['content']['orther']) {
             foreach ($data['content']['orther'] as $i => $t) {
                 $ourl = isset($t['url']) && $t['url'] ? $t['url'] : $url . '&page=' . $i;
                 $str .= '<item>' . PHP_EOL;
                 $str .= '<Title><![CDATA[' . strcut($t['title'], 28) . ']]></Title>' . PHP_EOL;
                 $str .= '<Description><![CDATA[' . $t['content'] . ']]></Description>' . PHP_EOL;
                 $str .= '<PicUrl><![CDATA[' . getImage($t['thumb']) . ']]></PicUrl>' . PHP_EOL;
                 $str .= '<Url><![CDATA[' . $ourl . ']]></Url>' . PHP_EOL;
                 $str .= '</item>' . PHP_EOL;
             }
         }
         $str .= '</Articles>' . PHP_EOL;
         $str .= '</xml>';
     } else {
         $str .= '<xml>' . PHP_EOL;
         $str .= '<ToUserName><![CDATA[' . $data['to'] . ']]></ToUserName>' . PHP_EOL;
         $str .= '<FromUserName><![CDATA[' . $data['from'] . ']]></FromUserName>' . PHP_EOL;
         $str .= '<CreateTime>' . time() . '</CreateTime>' . PHP_EOL;
         $str .= '<MsgType><![CDATA[' . $data['type'] . ']]></MsgType>' . PHP_EOL;
         $str .= '<Content><![CDATA[' . $data['content'] . ']]></Content>' . PHP_EOL;
         $str .= '<MsgId>' . $data['id'] . '</MsgId>' . PHP_EOL;
         $str .= '</xml>';
     }
     return $str;
 }
Пример #14
0
$n = 1;
if (is_array($rs)) {
    foreach ($rs as $r) {
        $attach = unserialize($r['attach']);
        ?>
<a href="<?php 
        echo $r['url'];
        ?>
" class="list-group-item">
                    <h4 class="list-group-item-heading"><span class="badge"><?php 
        echo $categorys[$attach['cid']]['name'];
        ?>
</span> <?php 
        echo strcut($r['title'], 40);
        ?>
</h4>
                    <p class="list-group-item-text">&nbsp;<?php 
        echo strcut($r['remark'], 50);
        ?>
</p>
                </a>
<?php 
        $n++;
    }
}
?>
</div>
<?php 
if (defined('IN_ADMIN') && !defined('HTML')) {
    echo '</div>';
}
Пример #15
0
        echo $r['message_id'];
        ?>
)"><?php 
        echo $r['user_id'] ? $r['user_name'] : '游客';
        ?>
</a></td>
        <td align="center"><?php 
        echo $r['ip'];
        ?>
</td>
        <td align="center"><?php 
        echo '<a href="javascript:;" onclick="show_content(' . $r['message_id'] . ')">' . ($r['title'] ? strcut($r['title'], 20) : strcut($r['content'], 20)) . '</a>';
        ?>
</td>
        <td align="center"><?php 
        echo strcut($r['last_reply'], 15);
        ?>
</td>
        <td align="center"><?php 
        echo date('Y-m-d H:i:s', $r['inputtime']);
        ?>
</td>
        <td align="center"><?php 
        if ($r['status'] == 0) {
            ?>
隐藏<?php 
        } else {
            ?>
 显示 <?php 
        }
        ?>
Пример #16
0
function format_member_data($data_arr)
{
    foreach ($data_arr as $k2 => $value) {
        $re_arr[$k2] = $value;
        if ($k2 == 'birthyear#birthmonth#birthday') {
            //生日
            $re_arr['birthyear'] = strcut('a' . $value, 'a', milu_lang('year'));
            $re_arr['birthmonth'] = strcut($value, milu_lang('year'), milu_lang('month'));
            $re_arr['birthday'] = strcut($value, milu_lang('month'), milu_lang('day'));
            unset($re_arr[$k2]);
        }
        if ($k2 == 'birthprovince#birthcity#birthdist#birthcommunity' || $k2 == 'resideprovince#residecity#residedist#residecommunity#residesuite') {
            //出生地 || 居住地
            $split_arr = explode(' ', $value);
            $key_arr = explode('#', $k2);
            $combine_arr = array_combine($key_arr, $split_arr);
            $re_arr = $combine_arr ? array_merge($re_arr, $combine_arr) : $re_arr;
            unset($re_arr[$k2]);
        }
        if ($k2 == 'regdate' || $k2 == 'lastvisit' || $k2 == 'lastactivity' || $k2 == 'lastpost') {
            $re_arr[$k2] = strtotime($re_arr[$k2]);
        }
        //处理时间
        //个人主页
        if ($k2 == 'site') {
            $re_arr[$k2] = _striptext($re_arr[$k2]);
        }
    }
    return $re_arr;
}
echo CMS_VERSION;
?>
 </td>
    </tr>
    <tr>
    <td colspan="2"><?php 
echo lang('a-ind-11');
?>
:&nbsp;<?php 
echo PHP_OS;
?>
 、 PHP<?php 
echo PHP_VERSION;
?>
 、<?php 
echo strcut($_SERVER['SERVER_SOFTWARE'], 20);
?>
</td>
    </tr>
	</table>
	</div>
</div>
<div class="bk10"></div>
<div class="col-2 lf mr10" style="width:100%">
    <h6><?php 
echo lang('a-ind-16');
?>
</h6>
	<div class="content">
	    <table width="540" border="0" cellpadding="0" cellspacing="0">
		  <tr>
Пример #18
0
$return = $this->_listdata("catid=4 order=time num=6");
extract($return);
if (is_array($return)) {
    foreach ($return as $key => $xiao) {
        ?>
                            <li>
                                <div class="newsListBox">
                                    <h4><a href="<?php 
        echo $xiao['url'];
        ?>
" target="_blank"><?php 
        echo $xiao['title'];
        ?>
</a></h4>
                                    <p class="newsViewText"><?php 
        echo strcut($xiao[description], 70, '');
        ?>
...</p>
                                    <p class="newsViewFoot"><a href="<?php 
        echo $xiao['url'];
        ?>
" target="_blank" class="newsListView">查看详情</a>
                                    </p>
                                </div>
                            </li>
                            <?php 
    }
}
?>
                        </ul>
                        <div class="tc moreBox"><a href="<?php 
Пример #19
0
function exception_handler($e)
{
    $message = "";
    if (is_cli()) {
        $message .= "*** Exception ***\n";
        $message .= "[" . $e->getCode() . "] " . $e->getMessage() . "\n";
        $message .= "Fichier : " . basename($e->getFile()) . " [ Ligne " . $e->getLine() . " ]" . "\n";
        $message .= "Chemin : " . $e->getFile() . "\n";
        $message .= "\n\n";
        echo $message;
        return;
    }
    $message .= "<div style='padding:20px; font:12px/1.7 Arial'>";
    $message .= "<h1>[" . $e->getCode() . "] " . $e->getMessage() . "</h1>";
    $message .= '<ul style="margin-bottom:50px">';
    $message .= '<li><b>Fichier :</b> ' . basename($e->getFile()) . ' [ <span style="color:red">' . $e->getLine() . '</span> ]</li>';
    $message .= '<li><b>Chemin :</b> <a href="' . $e->getFile() . '">' . $e->getFile() . '</a></li>';
    $message .= '</ul>';
    $trace = $e->getTrace();
    $trace = array_reverse($trace);
    $message .= "<h2>Trace :</h2>";
    foreach ($trace as $t) {
        $message .= '<ul style="margin-bottom:30px">';
        if (!isset($t['file'])) {
            $t['file'] = $e->getFile();
            $t['line'] = $e->getLine();
        }
        $message .= '<li><b>Fichier :</b> ' . basename($t['file']) . ' [ ligne <span style="color:red">' . $t['line'] . '</span> ]</li>';
        $message .= '<li><b>Chemin :</b> <a href="' . $t['file'] . '">' . $t['file'] . '</a></li>';
        if (isset($t['class']) && !empty($t['class'])) {
            $message .= '<li><b>Classe :</b> ' . $t['class'] . $t['type'] . $t['function'] . '(' . strcut(implode_r(', ', $t['args']), 5000, '<b style="color:red">[ ... ]</b>') . ')</li>';
        } else {
            if (isset($t['function']) && !empty($t['function'])) {
                $message .= '<li><b>Fonction :</b> ' . $t['function'] . '(' . strcut(implode_r(', ', $t['args']), 5000, '<b style="color:red">[ ... ]</b>') . ')</li>';
            }
        }
        if (isset($t['args']) && !empty($t['args'])) {
            $message .= '<li><b>Arguments :</b> <ul><li>' . strcut(implode_r(', ', $t['args']), 5000, '<b style="color:red">[ ... ]</b>') . '</li></ul></li>';
        }
        $message .= '</ul>';
    }
    $message .= "</div>";
    die($message);
}
Пример #20
0
    ?>
,<?php 
    echo $r['cid'];
    ?>
);">
                <div class="task-checkbox">
                    <?php 
    echo $r['id'];
    ?>
                </div>
                <div class="task-title">
                    <span class="task-title-sp" title="<?php 
    echo p_htmlentities($r['title']);
    ?>
"><?php 
    echo p_htmlentities(strcut($r['title'], 45));
    ?>
</span>
                    <div class="pull-right hidden-phone">
                        <?php 
    echo date('Y/m/d', $r['updatetime']);
    ?>
                    </div>
                </div>
            </li>

        <?php 
}
?>
        <div style="padding: 3px 50px;"><a class="btn btn-default btn-sm pull-left"  href="javascript:;" onclick="changepage(<?php 
echo max(1, $page - 1);
Пример #21
0
if (is_array($rs)) {
    foreach ($rs as $r) {
        ?>
                <a href="<?php 
        echo $r['url'];
        ?>
"><img src="<?php 
        echo $r['thumb'];
        ?>
" width="134" alt="<?php 
        echo $r['title'];
        ?>
"></a>
                <div class="caption">
                    <h5><?php 
        echo strcut($r['title'], 24);
        ?>
</h5>
                    <p>现价: <span class=" color_danger"><?php 
        echo $r['point'];
        ?>
积分</span></p>
                </div>
                <?php 
        $n++;
    }
}
?>
</ul>
<?php 
if (defined('IN_ADMIN') && !defined('HTML')) {
Пример #22
0
 public function execute($formdata)
 {
     $this->formdata = $formdata;
     $info = array();
     foreach ($formdata as $field => $value) {
         if ($this->check_field($field) === FALSE) {
             continue;
         }
         $field_config = $this->fields[$field];
         $name = $field_config['name'];
         $minlength = $field_config['minlength'];
         $maxlength = $field_config['maxlength'];
         $pattern = $field_config['pattern'];
         $errortips = $field_config['errortips'];
         if (empty($errortips)) {
             $errortips = $name . ' ' . L('not meet the conditions');
         }
         $length = empty($value) ? 0 : (is_string($value) ? mb_strlen($value, CHARSET) : count($value));
         if ($minlength && $length < $minlength) {
             if (!$this->display_error) {
                 return false;
             } else {
                 MSG($name . ' ' . L('min length error') . ' ' . $minlength . L('characters'));
             }
         }
         if ($maxlength && $length > $maxlength) {
             if (!$this->display_error) {
                 $value = strcut($value, $maxlength, '');
             } else {
                 MSG($name . ' ' . L('max length error') . ' ' . $maxlength . L('characters'));
             }
         } elseif ($maxlength) {
             $value = mb_substr($value, 0, $maxlength, CHARSET);
         }
         if ($pattern && $length && !preg_match($pattern, $value) && !$display_error) {
             MSG($errortips);
         }
         // $this->db->table = $field_config['master_field'] ? $field_config['master_table'] : $field_config['attr_table'];
         $func = $field_config['formtype'];
         //在field_config 必须包含的键值:field
         if (method_exists($this, $func)) {
             $value = $this->{$func}($field_config, $value);
         }
         if (is_string($value) || is_numeric($value)) {
             if ($field_config['master_field']) {
                 $info['master_data'][$field] = $value;
             } else {
                 $info['attr_data'][$field] = $value;
             }
         } elseif (is_array($value) && $value[0] != 'no_value') {
             if ($field_config['master_field']) {
                 foreach ($value as $_field => $_value) {
                     $info['master_data'][$_field] = $_value;
                 }
             } else {
                 foreach ($value as $_field => $_value) {
                     $info['attr_data'][$_field] = $_value;
                 }
             }
         }
         $info['master_table'] = $field_config['master_table'];
         $info['attr_table'] = $field_config['attr_table'];
     }
     return $info;
 }
Пример #23
0
 /**
  * 发送消息给关注用户
  */
 public function userSend()
 {
     $action = $this->input->post('action');
     $ids = $this->input->post('ids');
     if (!$ids && $action != 'all') {
         $this->adminMsg('未选择任何用户!');
     }
     $resources = $this->db->get('wx_content')->result_array();
     $data['ids'] = $ids;
     if ($action == 'all') {
         if (IS_POST) {
             $data = $this->input->post('data');
             if (!$data['content'] && !$data['type']) {
                 $this->adminMsg('回复内容不能为空');
             }
             $this->replyUsers($data, '', true);
         }
         $data['to'] = '所有用户';
         $data['action'] = 'all';
     } else {
         $users = $this->db->where_in('id', $ids)->get('wx_user')->result_array();
         if (IS_POST) {
             $data = $this->input->post('data');
             if (!$data['content'] && !$data['type']) {
                 $this->adminMsg('回复内容不能为空');
             }
             $this->replyUsers($data, $users);
         }
         foreach ($users as $user) {
             $nickname[] = $user['nickname'];
         }
         $data['to'] = strcut(join(' ; ', $nickname), 80);
         $data['action'] = 'sel';
     }
     $this->template->assign(array('data' => $data, 'resources' => $resources));
     $this->template->display('admin/wx_member_send');
 }
上一篇:<a title="<?php 
    echo $prev_page['title'];
    ?>
" href="<?php 
    echo $prev_page['url'];
    ?>
"><?php 
    echo strcut($prev_page['title'], 60, '...');
    ?>
</a><br /><?php 
}
if ($next_page) {
    ?>
下一篇:<a title="<?php 
    echo $next_page['title'];
    ?>
" href="<?php 
    echo $next_page['url'];
    ?>
"><?php 
    echo strcut($next_page['title'], 60, '...');
    ?>
</a><br /><?php 
}
?>
		</div>	
	</div>
</div>
<!--content-->
<?php 
include $this->_include('footer');
Пример #25
0
                                                <?php 
        $n = 1;
        if (is_array($r['goodlist'])) {
            foreach ($r['goodlist'] as $goodlist) {
                ?>
                                                <a href="<?php 
                echo $goodlist['url'];
                ?>
"><div class="orderproimg"><img src="<?php 
                echo $goodlist['thumb'];
                ?>
" title="<?php 
                echo $goodlist['remark'];
                ?>
"><span><?php 
                echo strcut($goodlist['remark'], 20);
                ?>
</span></div></a>
                                                <?php 
                $n++;
            }
        }
        ?>
                                            </td>
                                            <td class="orderlist"><?php 
        echo $r['quantity'];
        ?>
</td>
                                            <td class="orderlist"><?php 
        echo date('Y-m-d H:i', $r['addtime']);
        ?>
Пример #26
0
    $number = $content_template_parse->number;
}
?>
                        <?php 
$n = 1;
if (is_array($rs)) {
    foreach ($rs as $r) {
        ?>
                        <a href="<?php 
        echo $r['url'];
        ?>
" class="list-group-item_gr active"><span class="badge_top"><?php 
        echo str_pad($n, 2, "0", STR_PAD_LEFT);
        ?>
 </span>&nbsp;<?php 
        echo strcut($r['title'], 36);
        ?>
</a>
                        <?php 
        $n++;
    }
}
?>
                        <?php 
if (defined('IN_ADMIN') && !defined('HTML')) {
    echo '</div>';
}
?>
                    </div>
                </div>
            </div>
Пример #27
0
        ?>
    <li class="margin_left20">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td rowspan="2"><a href="<?php 
        echo $r['url'];
        ?>
"><img src="<?php 
        echo $r['thumb'];
        ?>
" height="70" width="74"></a></td>
                <td colspan="2"><a href="<?php 
        echo $r['url'];
        ?>
"><?php 
        echo strcut($r['remark'], 25);
        ?>
</a></td>
            </tr>
            <tr>
                <td><span class="color_heyihong">¥<?php 
        echo $r['price'];
        ?>
</span> &times;<?php 
        echo $r['quantity'];
        ?>
</td>
                <td><a href="/index?m=order&f=order_goods&v=del&id=<?php 
        echo $r['cartid'];
        ?>
">删除</a></td>