function event_toggle() { $get_data = $this->input->get(); $id = $get_data['id']; $i = $get_data['i']; $this->load->model('schedule_model'); $where = array('id' => $id); $data = $this->schedule_model->get_row_array($where); if (!empty($data)) { if ($i % 2 == 0) { echo $data['intro']; } else { if ($i % 2 == 1) { $intro = utf_substr($data['intro'], 180); if (strlen($data['intro']) >= 180) { $intro .= "..."; } echo $intro; } } } }
" style="max-width:80px; max-height:80px;"></a> <span class="vip"><img src="<?php echo base_url(); ?> useful/img/vip.png" class="png"></span> </div> </div> <p class="name_address"><span><?php echo @$v['exh_data']['ground_name']; ?> </span><?php echo @$v['exh_data']['ground_address']; ?> </p> <p class="words" style="min-height:42px;"><?php echo @utf_substr($v['exh_data']['intro'], 300); ?> </p> <p class="more"><a href="fair.php"><img src="<?php echo base_url(); ?> useful/img/icon_more_p1.png"></a></p> </div> </div> <?php if ($myself) { ?> <div class="add_delete"> <p class="png"> <?php
$cate_list[] = array('id' => $DB_Record[0], 'title' => $DB_Record[1]); } } //每月条数统计 //------------------------------0----===========--1 $SqlStr = 'SELECT COUNT(left(posttime,7)), left(posttime,7) as `sj` FROM `' . DB_TABLE_PRE . 'mb_blog` GROUP By `sj` Order By `posttime` DESC LIMIT 5;'; $MyDatabase->SqlStr = $SqlStr; if ($MyDatabase->Query()) { $DB_Record_Arr = $MyDatabase->ResultArr; foreach ($DB_Record_Arr as $DB_Record) { $posttime_list[] = array('count' => $DB_Record[0], 'month' => $DB_Record[1]); } } //quick列表 //-------------------0 $SqlStr = ' SELECT `title` from `' . DB_TABLE_PRE . 'mb_quick`'; $SqlStr .= ' ORDER BY `id` DESC'; $SqlStr .= ' LIMIT 5;'; $MyDatabase->SqlStr = $SqlStr; if ($MyDatabase->Query()) { $DB_Record_Arr = $MyDatabase->ResultArr; foreach ($DB_Record_Arr as $DB_Record) { $quick_list[] = array('title_long' => $DB_Record[0], 'title' => utf_substr($DB_Record[0], 42)); } } //管理员日志 $ThisPage = 'index.php'; $log_content = 'Blog列表'; require 'include/log.php'; require PAGENAME . '.php'; require 'include/debug.php';
<td height="24" align="left" valign="middle"><?php echo getLastServices($list['id']); ?> </td> <td height="24" align="left" valign="middle"><?php echo date('Y-m-d', strtotime($list['dateline'])); ?> <br><?php echo empty($list['managerid']) ? "公海" : getRealnamebyName($list['managerid']); ?> </td> <td width="15%" height="24" align="left" valign="middle"> <?php if ($industry == '4') { echo $list['rank']; } else { echo "<a href='customer_action.php?act=mod&id=" . $list['id'] . "&tab=0' title='" . $list['services'] . "'>" . utf_substr($list['services'], 20) . "</a>"; } ?> </td> <td height="24" align="center" valign="middle"> <a href="customer_action.php?act=mod&id=<?php echo $list['id']; ?> &page=<?php echo $page; ?> "><img src="../images/edit.gif" border="0" /></a> <?php if ($_SESSION['supermanager'] < 6) { ?> <a href="customer_ok.php?id=<?php echo $list['id'];
DB::run()->query("UPDATE `forums` SET `forums_last_id`=?, `forums_last_themes`=?, `forums_last_user`=?, `forums_last_time`=? WHERE `forums_id`=?;", array($tid, $topics['topics_title'], $log, SITETIME, $topics['forums_parent'])); } } // -- Загрузка файла -- // if (!empty($_FILES['file']['name']) && !empty($lastid)) { if ($udata['users_point'] >= $config['forumloadpoints']) { if (is_uploaded_file($_FILES['file']['tmp_name'])) { $filename = check($_FILES['file']['name']); $filename = !is_utf($filename) ? utf_lower(win_to_utf($filename)) : utf_lower($filename); $filesize = $_FILES['file']['size']; if ($filesize > 0 && $filesize <= $config['forumloadsize']) { $arrext = explode(',', $config['forumextload']); $ext = getExtension($filename); if (in_array($ext, $arrext) && $ext != 'php') { if (utf_strlen($filename) > 50) { $filename = utf_substr($filename, 0, 45) . '.' . $ext; } if (!file_exists(BASEDIR . '/upload/forum/' . $topics['topics_id'])) { $old = umask(0); mkdir(BASEDIR . '/upload/forum/' . $topics['topics_id'], 0777, true); umask($old); } $num = 0; $hash = $lastid . '.' . $ext; while (file_exists(BASEDIR . '/upload/forum/' . $topics['topics_id'] . '/' . $hash)) { $num++; $hash = $lastid . '_' . $num . '.' . $ext; } move_uploaded_file($_FILES['file']['tmp_name'], BASEDIR . '/upload/forum/' . $topics['topics_id'] . '/' . $hash); DB::run()->query("INSERT INTO `files_forum` (`file_topics_id`, `file_posts_id`, `file_hash`, `file_name`, `file_size`, `file_user`, `file_time`) VALUES (?, ?, ?, ?, ?, ?, ?);", array($topics['topics_id'], $lastid, $hash, $filename, $filesize, $log, SITETIME)); } else {
<div class="hover"> <div class="hover_inner"> <div class="top clearfix"> <div class="words_con"> <p class="name"><span><?php echo @$temp['g_country']?></span><span><?php echo @$temp['g_province']?></span><?php echo @$temp['g_city']; ?></p> <p class="timing"><?php echo date("Y.m.d", $temp['begin_time']) . ' - ' . date("Y.m.d", $temp['end_time']); ?></p> <h2><?php echo $temp['title']; ?></h2> </div> <div class="pic" style="height:80px;"><a href="<?php echo base_url('exhibition/index?id='.$temp['id']); ?>"><img src="<?php echo base_url(); ?><?php echo $temp['pic']; ?>" style="max-width:80px; max-height:80px;"></a> <?php if(!empty($temp['is_pass'])){ if($temp['is_pass'] == 1){ ?> <span class="vip"><img src="<?php echo base_url(); ?>useful/img/vip.png" class="png"></span> <?php }} ?> </div> </div> <p class="name_address"><span><?php if(!empty($temp['ground_name'])){ echo $temp['ground_name']; } ?></span><?php if(!empty($temp['ground_place'])){ echo $temp['ground_place']; } ?></p> <div class="words" style="min-height:32px;"><?php if(!empty($temp['intro'])){ echo utf_substr($temp['intro'],100); } ?><?php if(!empty($temp['intro'])){ if(strlen($temp['intro']) >= 100){ echo "..."; } } ?></div> <p class="more"><a href="<?php if(!empty($temp['exhibition_url']) && isset($temp['exhibition_url'])){ echo $temp['exhibition_url']; } ?>"><img src="<?php echo base_url();?>useful/img/icon_more_p1.png"></a></p> </div> </div> </li> <?php } ?> <?php }else{ ?> <div style="width:auto; height:300px; border:0px solid red; padding:20px; font-size:14px; color:red">未找到你要的数据,抱歉,请重新查询</div> <?php } ?> </ul> </div> <style> .xpager ul li{ float: left; margin-bottom: 20px;
/** * build_caption() * * @param array $rowset by reference * @param array $must_have **/ function build_caption(&$rowset, $must_have = array()) { global $CONFIG, $THEME_DIR; global $album_date_fmt, $lastcom_date_fmt, $lastup_date_fmt, $lasthit_date_fmt, $cat; global $lang_get_pic_data, $lang_meta_album_names, $lang_errors; foreach ($rowset as $key => $row) { $caption = ''; if ($CONFIG['display_filename']) { $caption .= '<span class="thumb_filename">' . $row['filename'] . '</span>'; } $caption .= $row['title'] ? '<span class="thumb_title">' . $row['title'] . '</span>' : ''; if ($CONFIG['views_in_thumbview'] || in_array('hits', $must_have)) { $caption .= '<span class="thumb_title">' . sprintf($lang_get_pic_data['n_views'], $row['hits']) . '</span>'; } if ($CONFIG['caption_in_thumbview']) { $caption .= $row['caption'] ? "<span class=\"thumb_caption\">" . strip_tags(bb_decode($row['caption'])) . "</span>" : ''; } if ($CONFIG['display_comment_count']) { $comments_nr = count_pic_comments($row['pid']); if ($comments_nr > 0) { $caption .= "<span class=\"thumb_num_comments\">" . sprintf($lang_get_pic_data['n_comments'], $comments_nr) . "</span>"; } } if ($CONFIG['display_uploader']) { $caption .= $row['owner_id'] && $row['owner_name'] ? '<span class="thumb_title"><a href ="profile.php?uid=' . $row['owner_id'] . '">' . $row['owner_name'] . '</a></span>' : ''; } if (in_array('msg_date', $must_have)) { $caption .= '<span class="thumb_caption">' . localised_date($row['msg_date'], $lastcom_date_fmt) . '</span>'; } if (in_array('msg_body', $must_have)) { $msg_body = strip_tags(bb_decode($row['msg_body'])); // I didn't want to fully bb_decode the message where report to admin isn't available. -donnoman $msg_body = utf_strlen($msg_body) > 50 ? utf_substr($msg_body, 0, 50) . '...' : $msg_body; if ($CONFIG['enable_smilies']) { $msg_body = process_smilies($msg_body); } if ($row['author_id']) { $caption .= '<span class="thumb_caption"><a href ="profile.php?uid=' . $row['author_id'] . '">' . $row['msg_author'] . '</a>: ' . $msg_body . '</span>'; } else { $caption .= '<span class="thumb_caption">' . $row['msg_author'] . ': ' . $msg_body . '</span>'; } } if (in_array('ctime', $must_have)) { $caption .= '<span class="thumb_caption">' . localised_date($row['ctime'], $lastup_date_fmt) . '</span>'; } if (in_array('pic_rating', $must_have)) { if (defined('THEME_HAS_RATING_GRAPHICS')) { $prefix = $THEME_DIR; } else { $prefix = ''; } $caption .= "<span class=\"thumb_caption\">" . '<img src="' . $prefix . 'images/rating' . round($row['pic_rating'] / 2000) . '.gif" alt=""/>' . '<br />' . sprintf($lang_get_pic_data['n_votes'], $row['votes']) . '</span>'; } if (in_array('mtime', $must_have)) { $caption .= "<span class=\"thumb_caption\">" . localised_date($row['mtime'], $lasthit_date_fmt); if (GALLERY_ADMIN_MODE) { $caption .= "<br/>" . $row['lasthit_ip']; } $caption .= '</span>'; } $rowset[$key]['caption_text'] = $caption; } $rowset = CPGPluginAPI::filter('thumb_caption', $rowset); }
$fileforum = file(DATADIR . "dataforum/mainforum.dat"); $total = count($fileforum); if ($total > 0) { foreach ($fileforum as $forumval) { $forum = explode("|", $forumval); echo '<div class="b"><img src="/images/img/forums.gif" alt="image" /> '; echo '<b><a href="forum.php?fid=' . $forum[0] . '&' . SID . '">' . $forum[1] . '</a></b> (' . $forum[2] . '/' . $forum[3] . ')</div>'; $totalforum = counter_string(DATADIR . "dataforum/topic" . $forum[0] . ".dat"); if ($totalforum > 0) { $filetopic = file(DATADIR . "dataforum/topic" . $forum[0] . ".dat"); $topic = explode("|", end($filetopic)); if (file_exists(DATADIR . 'dataforum/' . $forum[0] . '-' . $topic[0] . '.dat')) { $filepost = file(DATADIR . 'dataforum/' . $forum[0] . '-' . $topic[0] . '.dat'); $post = explode("|", end($filepost)); if (utf_strlen($topic[3]) > 35) { $topic[3] = utf_substr($topic[3], 0, 30); $topic[3] .= "..."; } echo '<div>Тема: <a href="topic.php?act=end&fid=' . $forum[0] . '&id=' . $topic[0] . '&' . SID . '">' . $topic[3] . '</a><br />'; echo 'Сообщение: ' . nickname($post[2]) . ' (' . date_fixed($post[6]) . ')</div>'; } else { echo 'Последняя тема не найдена!'; } } else { echo 'Раздел пустой! Темы еще не созданы!'; } } echo '<br />Всего разделов: <b>' . $total . '</b><br /><br />'; } else { show_error('Форум пустой! Разделы еще не созданы!'); }
echo $arr_user['business']; ?> </li> <?php } ?> --> </ul> <?php if (!empty($arr_user['intro'])) { ?> <div class="show_intro showdetail"> <div class="_intro"><p><?php echo utf_substr($arr_user['intro'], 300); ?> </p></div> </div> <p class="more1"><a class="intro_up" style="cursor:pointer;" onClick="hide_intro('hide','<?php echo @$arr_user['id']; ?> ')"></a> <a class="intro_down" onClick="hide_intro('show','<?php echo @$arr_user['id']; ?> ')" style="display:none; cursor:pointer;"></a></p> <?php } ?> <form action="<?php
<div class="goods-pic"> <a href="<?php echo $array['click_url']; ?> " target="_blank"> <img src="<?php echo $array['pic_url']; ?> " alt="" title="<?php echo $array['title']; ?> "> </a> </div> <div class="op"><?php echo utf_substr($array['title'], 40); ?> </div> <div class="op"> <div class="desc"> <strong>¥<?php echo $array['price']; ?> </strong> </div> <div class="buttonline"> <a href="<?php echo $array['click_url']; ?> " title="去购买" class="btn btn-success" target="_blank">去购买
<?php } ?> </table> </div> </div> <div class="product"> <?php if (!empty($items['product_range']) && isset($items['product_range'])) { ?> <p>展品范围</p> <div class="more_product_range showdetail"> <div class="more_product_in"> <p><?php echo utf_substr(strip_tags($items['product_range']), 200); ?> </p> </div> </div> <?php if (strlen(strip_tags($items['product_range'])) > 200) { ?> <p class="more"><a class="a_up range_up" style="text-decoration:none; cursor:pointer" onClick="hide_text('hide','<?php echo @$items['id']; ?> ','product_range')"></a> <a class="a_down range_down" style="text-decoration:none; cursor:pointer; display:none;" onClick="hide_text('show','<?php echo @$items['id']; ?> ','product_range')"></a></p> <?php
function defaults_show() { $num = $this->input->post('num'); $now_num = 4 - $num; $this->db->where('business', '百亿特辑'); $this->db->limit($now_num); $this->db->order_by('id', 'random'); $query = $this->db->get('exhibition'); $data = $query->result_array(); /*if(!empty($data)) { foreach($data as $k=>$v) { //判断是否为 } }*/ $html_result = ''; $html_product = ''; foreach ($data as $key => $item) { $html_result .= ' <li> <div class="pin"> <div class="top clearfix"> <div class="time"> <p><span>' . date('Y', $item['begin_time']) . '</span><br> ' . date('m.d', $item['begin_time']) . '<br> <span>' . date('Y', $item['end_time']) . '</span><br> ' . date('m.d', $item['end_time']) . '</p> </div> <div class="pic" style="height:80px;"> <a href="' . base_url('exhibition/index?id=' . $item['id']) . '" target="_blank"><img src="' . base_url($item['pic']) . '" style="max-width:80px; max-height:80px;"></a> <span class="vip"><img src="' . base_url('useful/img/vip.png') . '" class="png"></span> </div> </div> <p class="name"><span>' . @$item['country'] . '</span><span>' . @$item['province'] . '</span>' . @$item['city'] . '</p> <p class="words" style="height:50px;">' . @utf_substr($item['title'], 54) . '</p> </div> <div class="hover"> <div class="hover_inner"> <div class="top clearfix"> <div class="words_con"> <p class="name"><span>' . @$item['country'] . '</span><span>' . @$item['province'] . '</span>' . @$item['city'] . '</p> <p>' . date("Y-m-d", $item['begin_time']) . '-' . date("Y-m-d", $item['end_time']) . '</p> <h2>' . @$item['title'] . '</h2> </div> <div class="pic" style="height:80px;"> <a href="" target="_blank"><img src="' . base_url($item['pic']) . '" style="max-width:80px; max-height:80px;"></a> <span class="vip"><img src="' . base_url('useful/img/vip.png') . '" class="png"></span> </div> </div> <p class="name_address"><span>' . @$item['ground_name'] . '</span>' . @$item['ground_address'] . '</p> <p class="words" style="min-height:32px;">' . @utf_substr($item['intro'], 400) . '</p> <p class="more"><a href="' . base_url('exhibition/index?id=' . $item['id']) . '" target="_blank"><img src="' . base_url('useful/img/icon_more_p1.png') . '"></a></p> </div> </div> </li>'; } echo $html_result; }
function getdata($sqlstr, $code) { global $db; $sort_list = $db->getlist($sqlstr); foreach ($sort_list as $list) { preg_match_all('/<luocms([\\s\\S]*?)>([\\s\\S]*?)<\\/luocms>/', $code, $block_list); $hreftemp = $block_list[2][0]; $formtemp = $block_list[1][0]; $hreftempnew = $hreftemp; preg_match_all('/src=(\\")(.*?)(\\")/', $formtemp, $srclist); //得到是哪个表的内容 $src_temp = $srclist[2][0]; preg_match_all('/src=(\\")(.*?)(\\")/', $hreftemp, $srclist); //要生成的缩略图的部分 $s_pic_temp = $srclist[2][0]; //echo $s_pic_temp; preg_match_all('/\\[(.*?)\\swidth=(\'|\\")(.*?)(\'|\\")\\sheight=(\'|\\")(.*?)(\'|\\")\\]/', $s_pic_temp, $picturex); //生成缩略图并替换标签 $pxMax = count($picturex[0]); //echo $pxMax; for ($p = 0; $p < $pxMax; $p++) { $pp = $picturex[1][$p]; //echo $picturex[0][$p]; $ppw = $picturex[3][$p]; $pph = $picturex[6][$p]; $p_picture = $this->get_content_row($list['id'], 'picture'); if (!empty($ppw) && !empty($pph)) { $img_ext = strrchr($p_picture, '.'); $p_smallpic = substr($p_picture, 0, strlen($p_picture) - strlen($img_ext)) . "_s" . $img_ext; if (!file_exists($p_smallpic)) { $temp = new CreatMiniature(); $temp->SetVar($p_picture, $img_ext); $temp->BackFill('./' . $p_smallpic, $ppw, $pph, "255", "255", "255"); } $temp_img = "../" . $p_smallpic; } else { $temp_img = "../" . $p_picture; } //echo $picturex[0][$p]; $hreftempnew = str_replace($picturex[0][$p], $temp_img, $hreftempnew); } preg_match_all('/\\[luo\\.(.*?)\\]/', $hreftemp, $tName); //处理截取字符标签[luo.cotnent len='180'] $tArrMax = count($tName[0]); for ($k = 0; $k < $tArrMax; $k++) { $t1 = strtolower($tName[0][$k]); // 属性名称[luo.title] $t2 = strtolower($tName[1][$k]); //字段名title preg_match_all('/(.*?)x\\slen=(\'|\\")(.*?)(\'|\\")/', $t2, $titlex); $txArrMax = count($titlex[0]); for ($w = 0; $w < $txArrMax; $w++) { $ttr = $titlex[1][$w]; $tx = $titlex[0][$w]; $txx = "[luo." . $tx . "]"; $len = $titlex[3][$w]; $temp_c_value = get_html_replace($list[$ttr]); $temp_sub_str = utf_substr(htmlspecialchars(strip_tags(stripslashes($temp_c_value))), $len); $temp_sub_str_ext = strlen($list[$ttr]) > $len ? $temp_sub_str . "..." : $temp_sub_str; $hreftempnew = str_replace($txx, $temp_sub_str_ext, $hreftempnew); } switch ($t2) { //替换内容标签[luo.*] case "url": //链接 switch ($src_temp) { //根据当前表名用不同的链接地址 case "content": //内容表 $urltemp = $this->get_tpl_name($this->getclassid($list['id']), 'templateview') . "_" . $list['id'] . $GLOBALS[rewriteext]; $hreftempnew = str_replace($t1, $urltemp, $hreftempnew); break; case "link": //友情链接表 $urltemp = $list['url']; $hreftempnew = str_replace($t1, $urltemp, $hreftempnew); break; } break; case "classurl": //导航类别中地址 $urltemp = $this->get_tpl_name($list['id'], 'template') . "-" . $list['id'] . $GLOBALS[rewriteext]; $hreftempnew = str_replace($t1, $urltemp, $hreftempnew); break; case "content": //内容 $hreftempnew = str_replace($t1, strip_tags(stripslashes($list[$t2])), $hreftempnew); break; case "contentc": //显示单条内容时不用去除样式 $hreftempnew = str_replace($t1, stripslashes($list["content"]), $hreftempnew); break; case "title": //标题 $title = getstyle("content", $list['id'], $list['title']); $hreftempnew = str_replace($t1, $title, $hreftempnew); break; case "picture": //原始大小图片 $hreftempnew = str_replace($t1, '../' . $this->get_content_row($list['id'], 'picture'), $hreftempnew); break; case "replay": //留言板的回复 $temp_replay = empty($list['replay']) ? "" : "<div class='reply'><div class='gly'><b>管理员回复:</b>" . $list['replaytime'] . "</div><div class='gly_content'>" . $list['replay'] . "</div></div>"; $hreftempnew = str_replace($t1, $temp_replay, $hreftempnew); break; default: //其它,直接显示字段所对应的内容[luo.name]等 $hreftempnew = str_replace($t1, $list[$t2], $hreftempnew); break; } } $str_temp .= $hreftempnew; } return $str_temp; }
$otkel = check(no_br($_POST['otkel'])); $infa = check(no_br($_POST['infa'])); $mobila = check(no_br($_POST['mobila'])); $icq = check($_POST['icq']); $pol = check(no_br($_POST['pol'])); $rost = (int) $_POST['rost']; $ves = (int) $_POST['ves']; $site = check($_POST['site']); $happy = check($_POST['happy']); if ($uid == $_SESSION['token']) { if (preg_match('#^http://([a-z0-9_\\-\\.])+(\\.([a-z0-9\\/])+)+$#', $site) || $site == "") { if (preg_match('#^[0-9]{1,2}+\\.[0-9]{2}+\\.([0-9]{2}|[0-9]{4})$#', $happy) || $happy == "") { $otkel = utf_substr($otkel, 0, 50); $infa = utf_substr($infa, 0, 500); $mobila = utf_substr($mobila, 0, 30); $my_name = utf_substr($my_name, 0, 50); change_profil($log, array(2 => $otkel, 3 => $infa, 5 => $site, 13 => $mobila, 14 => $ip, 15 => $pol, 16 => $rost, 17 => $ves, 18 => $happy, 19 => $icq, 29 => $my_name)); header("Location: profil.php?isset=editprofil&" . SID); exit; } else { echo '<img src="../images/img/error.gif" alt="image" /> <b>Неправильный формат даты рождения, необходим формат дд.мм.гг</b><br />'; } } else { echo '<img src="../images/img/error.gif" alt="image" /> <b>Неправильный адрес сайта, необходим формата http://my_site.domen</b><br />'; } } else { echo '<img src="../images/img/error.gif" alt="image" /> <b>Ошибка! Неверный идентификатор сессии, повторите действие!</b><br />'; } echo '<br /><img src="../images/img/back.gif" alt="image" /> <a href="profil.php?' . SID . '">Вернуться</a><br />'; } } else {
function utf_shorttext($str, $len) { $s = utf_substr($str, $len); if ($s != $str) { $s .= '...'; } return $s; }
} ?> </b> <a href="<?php echo base_url('exhibition/index?id=' . $item['e_id']); ?> " class="text">﹟<?php if (!empty($item['e_title'])) { echo $item['e_title']; } ?> ﹟</a> </h2> <p><?php if (!empty($item['c_content'])) { echo utf_substr(strip_tags(nl2br($item['c_content'])), 300); } if (!empty($item['c_content'])) { if (strlen($item['c_content']) > 300) { echo "......"; } } ?> </p> </div> <div class="hz_func clearfix"> <div class="hz_from"><a style="cursor:pointer;">回复</a></div> <div class="hz_handle clearfix"> <ul> <li class="h_func1"><a>回复</a><span class="huifu<?php echo $key;
<div class="img2" style="height:98px;"> <a href="<?php echo base_url().'company/index?id='.$temp['id']?>"><img src="<?php echo base_url().$temp['logo'];?>" style="max-width:94px; max-height:94px;" /></a> </div> <!--<div class="vip"><img class="png" src="<?php echo base_url();?>useful/img/vip.png"></div>--> <div class="name_phone"> <h2><?php echo $temp['name']?></h2> <h3>上海</h3> <p class="phone"> <?php if($temp['telephone_pub']){ echo $temp['telephone']."<br />"; }?> <?php if($temp['cellphone_pub']){ echo $temp['cellphone']."<br />"; }?> <?php if($temp['fax_pub']){ echo $temp['fax']; }?> </p> </div> </div> <div class="con"> <p><?php if(!empty($temp['intro'])){ echo utf_substr($temp['intro'],400); } ?><?php if(!empty($temp['intro'])){ if(strlen($temp['intro']) >= 400){ echo "..."; } } ?></p> <!--<p class="more"><a href="<?php echo base_url('company/data?id='.$temp['id'])?>"><img src="<?php echo base_url();?>useful/img/icon_more_p1.png"></a></p>--> <ul> <?php if(!empty($temp['image']) && isset($temp['image'])){ foreach($temp['image'] as $key=>$value){ ?> <li <?php if($key == 3){ ?>class="last"<?php } ?>><img src="<?php echo base_url($value['ar_pic']);?>" style="max-width:50px; max-height:50px;" /></li> <!--<li><img src="<?php echo base_url();?>useful/img/sub_p2.png" /></li> <li><img src="<?php echo base_url();?>useful/img/sub_p2.png" /></li> <li class="last"><img src="<?php echo base_url(); ?>useful/img/sub_p2.png" /></li>--> <?php } }else{ ?> <p style="padding-bottom:10px;"></p> <?php } ?> </ul> </div>
echo '<input value="Отправить" name="go" type="submit" /></form><hr />'; echo 'Обновите страницу если вы не видите проверочный код!<br />'; } //------------------------------ Отправка сообшения --------------------------// if ($action == "go") { $name = check($_POST['name']); $body = check($_POST['body']); $umail = check($_POST['umail']); $provkod = (int) $_POST['provkod']; if ($_SESSION['protect'] == $provkod) { if (utf_strlen(trim($name)) >= 3 && utf_strlen($name) < 50) { if (utf_strlen(trim($body)) >= 5 && utf_strlen($body) < 5000) { if (preg_match('#^([a-z0-9_\\-\\.])+\\@([a-z0-9_\\-\\.])+(\\.([a-z0-9])+)+$#', $umail)) { $_SESSION['protect'] = ""; unset($_SESSION['protect']); $body = utf_substr($body, 0, 5000); addmail($config['emails'], "Письмо с сайта " . $config['title'], "Ip: {$ip} \nБраузер: {$brow} \nОтправлено: " . date('j.m.y / H:i', SITETIME) . "\n\nСообщение: \n" . $body, $umail, $name); header("Location: ../index.php?isset=mail&" . SID); exit; } else { show_error('Вы ввели неверный адрес e-mail, необходим формат name@site.domen!'); } } else { show_error('Слишком длинное или короткое сообшение, необходимо от 5 до 5000 символов!'); } } else { show_error('Слишком длинное или короткое имя, необходимо от 3 до 50 символов!'); } } else { show_error('Проверочное число не совпало с данными на картинке!'); }
<div class="name_phone"> <h2></h2> <h3><?php echo $temp['title']; ?> </h3> <p class="phone"></p> </div> </div> <div class="con" style="border:0px solid red; min-height:48px;"> <p><a href="<?php echo base_url('company/product' . $url_subfix . '&cid=' . $current_category_id . '&pid=' . $temp['id'] . '#bg5'); ?> " style="color:#222222; text-decoration:none;"><?php if (!empty($temp['intro'])) { echo utf_substr(strip_tags($temp['intro']), 400); } if (!empty($temp['intro'])) { if (strlen($temp['intro']) >= 400) { echo "..."; } } ?> </a></p> </div> </div> <?php if (!empty($c_num) && isset($c_num)) { ?> <div class="add_delete"> <p class="png">
</div> </div> <p class="name_address"><span><?php if (!empty($temp['ground_name'])) { echo $temp['ground_name']; } ?> </span><?php if (!empty($temp['ground_place'])) { echo $temp['ground_place']; } ?> </p> <div class="words" style="min-height:32px;"><?php if (!empty($temp['intro'])) { echo utf_substr($temp['intro'], 400); } if (!empty($temp['intro'])) { if (strlen($temp['intro']) >= 400) { echo "..."; } } ?> </div> <p class="more"><a href="<?php echo $temp['exhibition_url']; ?> " target="_blank"><img src="<?php echo base_url(); ?> useful/img/icon_more_p1.png"></a></p>
function exhibition_next() { $lanmu = $this->input->post('lanmu'); $page = $this->input->post('page'); $this->load->model('exhibition_model'); $this->load->model('common_model'); $where['business'] = $lanmu; $c_data = $this->exhibition_model->get_list($where); $total = count($c_data); // 总数据条数 $num = 4; $pages = ceil($total / $num); // 总页码 if ($total > $num) { if ($page <= $pages - 1) { $offset = $page * 4; $page += 1; $a_num = $this->common_model->get_page_exh($offset, $num, $lanmu)->result_array(); // var_dump($a_num); } else { if ($page > $pages - 1) { $page = 1; $offset = ($page - 1) * $num; $a_num = $this->common_model->get_page_exh($offset, $num, $lanmu)->result_array(); // var_dump($a_num); } } $html_content = '<ul class="clearfix">'; foreach ($a_num as $temp) { // var_dump($temp); // 判断是否认证通过 $vip_html = ''; // 关联会展认证 $this->db->where('exh_id', $temp['id']); $check_identify = $this->db->get('exhibition_identify')->row_array(); if (!empty($check_identify)) { if ($check_identify['is_zp_pass'] == 1 && $check_identify['is_gc_pass'] == 1 && $check_identify['is_ab_pass'] == 1) { $vip_html = '<span class="vip"><img src="' . base_url() . 'useful/img/vip.png" class="png"></span>'; } } $html_content .= '<li> <div class="pin"> <div class="top clearfix"> <div class="time"> <p><span>' . date("Y", $temp["begin_time"]) . '</span><br> ' . date("m.d", $temp["begin_time"]) . '<br> <span>' . date("Y", $temp["end_time"]) . '</span><br> ' . date("m.d", $temp['end_time']) . '</p> </div> <div class="pic"><a href="" target="_blank"><img src="' . base_url() . $temp['pic'] . '" style="max-width:80px; max-height:80px;"></a> ' . $vip_html . ' </div> </div> <p class="name"><span>' . $temp["country"] . '</span>' . $temp['city'] . '</p> <p class="words" style="height:50px;">' . @utf_substr($temp['title'], 54) . '</p> </div> <div class="hover"> <div class="hover_inner"> <div class="top clearfix"> <div class="words_con"> <p class="name"><span>' . $temp['country'] . '</span>' . $temp['city'] . '</p> <p>' . date("Y-m-d", $temp['begin_time']) . '-' . date("Y-m-d", $temp['end_time']) . '</p> <h2>' . $temp['title'] . '</h2> </div> <div class="pic"><a href="" target="_blank"><img src="' . base_url() . $temp['pic'] . '" style="max-width:80px; max-height:80px;"></a> <span class="vip"><img src="' . base_url() . 'useful/img/vip.png" class="png"></span> </div> </div> <p class="name_address"><span>成都流花河展览馆</span>成都某某某路23弄234号890室</p> <p class="words">' . $temp['intro'] . ' </p> <p class="more"><a href="" target="_blank"><img src="' . base_url() . 'useful/img/icon_more_p1.png"></a></p> </div> </div> </li>'; } $html_content .= '</ul>'; echo json_encode(array('page' => $page, 'html_content' => $html_content)); } }
?> "> <i></i> <img src="<?php echo base_url($temp['file_path']); ?> " /> </a> </div> <div class="show" style="text-align:center;"> <p><?php echo utf_substr($temp['title'], 20); ?> </p> <!--<p><?php echo utf_substr($temp['intro'], 21); ?> </p>--> </div> </div> <?php if ($myself) { ?> <div class="add_delete"> <p class="png"> <!--<a href="<?php echo base_url($current_controller . '/album_edit?id=' . $item['id'] . '&' . $temp['id']); ?> " class="add png fancybox fancybox.ajax">编辑</a> --> <a href="<?php echo base_url('user/data_delete_resource?sid=' . $temp['id']);
echo $list['code']; ?> </td> <td height="24" align="center" valign="middle"><a href="customer_dic.php?act=mod&id=<?php echo $list['id']; ?> "><?php echo $list['name']; ?> </a></td> <td align="center" valign="middle"><?php echo $list['sort']; ?> </td> <td align="center" valign="middle"><?php echo utf_substr($list['remark'], 20); ?> </td> <td height="24" align="center" valign="middle"><a href="customer_dic.php?act=mod&id=<?php echo $list['id']; ?> &page=<?php echo $page; ?> "><img src="../images/edit.gif" border="0" /></a> <a href="customer_dic.php?id=<?php echo $list['id']; ?> &act=del" onClick="javascript:return confirm('确实要删除吗?')"><img src="../images/del.gif" border="0" /></a></td> </tr> <?php
//------------------------------------------------------// $files = array_reverse($files); $total = count($files); if ($total > 0) { if ($start < 0 || $start >= $total) { $start = 0; } if ($total < $start + $config['boardspost']) { $end = $total; } else { $end = $start + $config['boardspost']; } for ($i = $start; $i < $end; $i++) { $data = explode("|", $files[$i]); if (utf_strlen($data[2]) > 100) { $data[2] = utf_substr($data[2], 0, 100); $data[2] .= "..."; } echo '<div class="b">'; echo '<img src="../images/img/forums.gif" alt="image" /> ' . ($i + 1) . '. '; echo '<b><a href="index.php?action=view&id=' . $id . '&bid=' . $data[5] . '&start=' . $start . '&' . SID . '">' . $data[0] . '</a></b> '; echo '<small>(' . date_fixed($data[3]) . ')</small></div>'; echo 'Текст объявления: ' . $data[2] . '<br />'; echo 'Автор объявления: <a href="../pages/anketa.php?uz=' . $data[1] . '&' . SID . '">' . nickname($data[1]) . '</a><br />'; } page_jumpnavigation('index.php?action=board&id=' . $id . '&', $config['boardspost'], $start, $total); page_strnavigation('index.php?action=board&id=' . $id . '&', $config['boardspost'], $start, $total); echo '<br />Всего объявлений: <b>' . (int) $total . '</b><br />'; } else { show_error('Объявлений еще нет, будь первым!'); }
if ($item['is_pass'] == 1) { ?> <span class="vip"><img src="<?php echo base_url(); ?> useful/img/vip.png" class="png"></span> <?php } } ?> </div> </div> <p class="name_address"><span>场地</span>场地地址</p> <p class="words" style="min-height:32px;"><?php if (!empty($item['intro'])) { echo utf_substr($item['intro'], 400); } if (!empty($item['intro'])) { if (strlen($item['intro']) >= 400) { echo "..."; } } ?> </p> <p class="more"><a href="<?php echo base_url('exhibition/index?id=' . $item['id']); ?> "><img src="<?echo base_url(); ?>useful/img/icon_more_p1.png"></a></p> </div> </div> <!--<div class="add_delete">
$access = $level; } else { $access = $user['users_level']; } if (!empty($pass)) { echo '<b><span style="color:#ff0000">Внимание! Вы изменили пароль пользователя!</span></b><br />'; echo 'Не забудьте ему напомнить его новый пароль: <b>' . $pass . '</b><br /><br />'; $mdpass = md5(md5($pass)); } else { $mdpass = $user['users_pass']; } list($uday, $umonth, $uyear) = explode(".", $joined); $joined = mktime('0', '0', '0', $umonth, $uday, $uyear); $name = utf_substr($name, 0, 20); $country = utf_substr($country, 0, 30); $city = utf_substr($city, 0, 50); $rating = $posrating - $negrating; DB::run()->query("UPDATE `users` SET `users_pass`=?, `users_email`=?, `users_joined`=?, `users_level`=?, `users_name`=?, `users_nickname`=?, `users_country`=?, `users_city`=?, `users_info`=?, `users_site`=?, `users_icq`=?, `users_gender`=?, `users_birthday`=?, `users_themes`=?, `users_point`=?, `users_money`=?, `users_status`=?, `users_avatar`=?, `users_rating`=?, `users_posrating`=?, `users_negrating`=? WHERE `users_login`=? LIMIT 1;", array($mdpass, $email, $joined, $access, $name, $nickname, $country, $city, $info, $site, $icq, $gender, $birthday, $themes, $point, $money, $status, $avatar, $rating, $posrating, $negrating, $uz)); save_title(); save_nickname(); save_money(); echo '<img src="/images/img/open.gif" alt="image" /> <b>Данные пользователя успешно изменены!</b><br /><br />'; } else { show_error('Ошибка! Слишком большая информация в графе о себе, не более 1000 символов!'); } } else { show_error('Ошибка! Вы не указали пол пользователя!'); } } else { show_error('Ошибка! Недопустимая дата дня рождения, необходим формат (дд.мм.гггг)!'); }
echo 'Указывайте верный е-мэйл, на него будут высланы регистрационные данные<br /><br />'; break; ############################################################################################ ## Регистрация ## ############################################################################################ ############################################################################################ ## Регистрация ## ############################################################################################ case 'register': $logs = check(strval($_POST['logs'])); $pars = check(strval($_POST['pars'])); $pars2 = check(strval($_POST['pars2'])); $provkod = check(strtolower($_POST['provkod'])); $invite = !empty($config['invite']) ? check(strval($_POST['invite'])) : ''; $meil = !empty($config['regmail']) ? strtolower(check(strval($_POST['meil']))) : ''; $domain = !empty($config['regmail']) ? utf_substr(strrchr($meil, '@'), 1) : ''; $gender = $_POST['gender'] == 1 ? 1 : 2; $registration_key = ''; $_SESSION['reglogs'] = $logs; $_SESSION['regmeil'] = $meil; $_SESSION['gender'] = $gender; $validation = new Validation(); $validation->addRule('equal', array($provkod, $_SESSION['protect']), 'Проверочное число не совпало с данными на картинке!')->addRule('regex', array($logs, '|^[a-z0-9\\-]+$|i'), 'Недопустимые символы в логине. Разрешены знаки латинского алфавита, цифры и дефис!', true)->addRule('regex', array($pars, '|^[a-z0-9\\-]+$|i'), 'Недопустимые символы в пароле. Разрешены знаки латинского алфавита, цифры и дефис!', true)->addRule('email', $meil, 'Вы ввели неверный адрес e-mail, необходим формат name@site.domen!', $config['regmail'])->addRule('string', $invite, 'Слишком длинный или короткий пригласительный ключ!', $config['invite'], 15, 20)->addRule('string', $logs, 'Слишком длинный или короткий логин!', true, 3, 20)->addRule('string', $pars, 'Слишком длинный или короткий пароль!', true, 6, 20)->addRule('equal', array($pars, $pars2), 'Ошибка! Введенные пароли отличаются друг от друга!')->addRule('not_equal', array($logs, $pars), 'Пароль и логин должны отличаться друг от друга!'); if (ctype_digit($pars)) { $validation->addError('Запрещен пароль состоящий только из цифр, используйте буквы!'); } if (substr_count($logs, '-') > 2) { $validation->addError('Запрещено использовать в логине слишком много дефисов!'); } if (!empty($logs)) { // Проверка логина или ника на существование
/** * build_caption() * * @param array $rowset by reference * @param array $must_have **/ function build_caption(&$rowset, $must_have = array(), $mode = 'files') { global $CONFIG, $THEME_DIR, $lang_date, $lang_get_pic_data, $cpg_udb; foreach ($rowset as $key => $row) { $caption = ''; if ($CONFIG['display_filename']) { $caption .= '<span class="thumb_filename">' . $row['filename'] . '</span>'; } if (!empty($row['title'])) { $caption .= '<span class="thumb_title thumb_title_title">' . $row['title'] . '</span>'; } if ($CONFIG['views_in_thumbview'] || in_array('hits', $must_have)) { $views = $mode == 'albums' ? $row['alb_hits'] : $row['hits']; $caption .= '<span class="thumb_title thumb_title_views">' . sprintf($lang_get_pic_data['n_views'], $views) . '</span>'; } if ($CONFIG['caption_in_thumbview'] && !empty($row['caption'])) { $caption .= '<span class="thumb_caption thumb_caption_caption">' . strip_tags(bb_decode($row['caption'])) . '</span>'; } if ($CONFIG['display_comment_count'] && $row['pid']) { $comments_nr = count_pic_comments($row['pid']); if ($comments_nr > 0) { $caption .= '<span class="thumb_num_comments">' . sprintf($lang_get_pic_data['n_comments'], $comments_nr) . '</span>'; } } if ($CONFIG['display_uploader']) { if ($row['owner_id']) { $caption .= '<span class="thumb_title thumb_title_owner"><a href="profile.php?uid=' . $row['owner_id'] . '">' . $cpg_udb->get_user_name($row['owner_id']) . '</a></span>'; } } if (in_array('msg_date', $must_have)) { $caption .= '<span class="thumb_caption thumb_caption_msg_date">' . localised_date($row['msg_date'], $lang_date['lastcom']) . '</span>'; } if (in_array('msg_body', $must_have)) { $msg_body = strip_tags(bb_decode($row['msg_body'])); // I didn't want to fully bb_decode the message where report to admin isn't available. -donnoman $msg_body = utf_strlen($msg_body) > 50 ? utf_substr($msg_body, 0, 50) . '...' : $msg_body; if ($CONFIG['enable_smilies']) { $msg_body = process_smilies($msg_body); } if ($row['author_id']) { $caption .= '<span class="thumb_caption thumb_caption_author"><a href="profile.php?uid=' . $row['author_id'] . '">' . $row['msg_author'] . '</a>: ' . $msg_body . '</span>'; } else { $caption .= '<span class="thumb_caption thumb_caption_author">' . $row['msg_author'] . ': ' . $msg_body . '</span>'; } } if (in_array('ctime', $must_have)) { $caption .= '<span class="thumb_caption thumb_caption_ctime">' . localised_date($row['ctime'], $lang_date['lastup']) . '</span>'; } if (in_array('pic_rating', $must_have)) { if (defined('THEME_HAS_RATING_GRAPHICS')) { $prefix = $THEME_DIR; } else { $prefix = ''; } //calculate required amount of stars in picinfo $rating = round($row['pic_rating'] / 2000 / (5 / $CONFIG['rating_stars_amount'])); $rating_images = ''; for ($i = 1; $i <= $CONFIG['rating_stars_amount']; $i++) { if ($i <= $rating) { $rating_images .= '<img src="' . $prefix . 'images/rate_full.png" alt="' . $rating . '"/>'; } else { $rating_images .= '<img src="' . $prefix . 'images/rate_empty.png" alt="' . $rating . '"/>'; } } $caption .= '<span class="thumb_caption thumb_caption_rating">' . $rating_images . '<br />' . sprintf($lang_get_pic_data['n_votes'], $row['votes']) . '</span>'; } if (in_array('mtime', $must_have)) { $caption .= '<span class="thumb_caption thumb_caption_mtime">' . localised_date($row['mtime'], $lang_date['lasthit']); if (GALLERY_ADMIN_MODE) { $caption .= '<br />' . $row['lasthit_ip']; } $caption .= '</span>'; } $rowset[$key]['caption_text'] = $caption; } $rowset = CPGPluginAPI::filter('thumb_caption', $rowset); }
<div class="goods-pic"> <a href="<?php echo site_url('home/redirect') . '/' . $array->id; ?> " target="_blank"> <img src="<?php echo $array->img_url; ?> " alt="" title="<?php echo $array->title; ?> "> </a> </div> <div class="op"><?php echo utf_substr($array->title, 40); ?> </div> <div class="op"><div class="desc"><strong>¥<?php echo $array->price; ?> </strong></div> <div class="buttonline"> <a href="<?php echo site_url('home/redirect') . '/' . $array->id; ?> " title="去购买" class="btn btn-success" target="_blank">去购买</a> </div></div> </div> </article> <?php
function getLastServices($fid) { global $db; $sql = get_sql("select name,dateline,userid from {pre}services where isdel=0 and fid=" . $fid . " order by id desc limit 1"); $list = $db->getonerow($sql); return "<a href='customer_action.php?act=mod&id=" . $fid . "&tab=1' title='" . $list['name'] . "'>" . utf_substr($list['name'], 20) . "</a><BR>" . $list['dateline'] . "/" . getRealnamebyName($list["userid"]); }