Пример #1
0
         exit;
     } elseif (isset($_GET['del']) && $_GET['del'] == $r_res['jpid']) {
         $dSQL = sprintf('delete from %s where jpid=%s', $yjl_dbprefix . 'jl_photo', $r_res['jpid']);
         $result = mysql_query($dSQL) or die('');
         $dSQL = sprintf('delete from %s where jpid=%s', $yjl_dbprefix . 'jl_topic', $r_res['jpid']);
         $result = mysql_query($dSQL) or die('');
         unlink($r_res['url']);
         unlink($r_res['t_url']);
         unlink($r_res['o_url']);
         if ($r_res['tid'] > 0) {
             $q_rep = sprintf('select a.tid, b.username, b.password, d.app_key, d.app_secret from %s as a, %s as b, %s as c, %s as d where a.tid=%s and a.uid=b.uid and a.tid=c.tid and c.item_id=d.id limit 1', $dbprefix . 'topic', $dbprefix . 'members', $dbprefix . 'topic_api', $dbprefix . 'app', $r_res['tid']);
             $rep = mysql_query($q_rep) or die('');
             $r_rep = mysql_fetch_assoc($rep);
             if (mysql_num_rows($rep) > 0) {
                 require_once '../lib/jishigouapi.class.php';
                 $JishiGouAPI = new JishiGouAPI($yjl_url . $yjl_tpath . 'api.php', $r_rep['app_key'], $r_rep['app_secret'], $r_rep['nickname'], md5($r_rep['nickname'] . $r_rep['password']));
                 $jsg_reqult = $JishiGouAPI->DeleteTopic($r_rep['tid']);
             }
             mysql_free_result($rep);
         }
         $_SESSION[$esid] = 2;
         echo '<script type="text/javascript">location.href=\'' . $f . '?p=' . $page . '\';</script>';
         exit;
     }
     $c .= '<tr class="altbg' . ($i % 2 + 1) . '"><td><img src="images/blank.gif" width="' . $a_wh_jltpt[0] . '" height="' . $a_wh_jltpt[1] . '" class="user_pic_v" style="background-image: url(' . $r_res['t_url'] . ');" alt="" title="点击查看大图" onclick="openimg(\'' . $r_res['o_url'] . '\', \'' . $r_res['width'] . '\', \'' . $r_res['height'] . '\');"></td><td><a href="photo-' . $r_res['xqid'] . '-' . $r_res['jlid'] . '.html" target="_blank">' . $r_res['name'] . '</a></td><td><a href="user-' . $r_res['uid'] . '.html" target="_blank">' . $r_res['nc'] . '</a></td><td>' . date('Y-m-d H:i', $r_res['datetime']) . '</td><td>' . date('Y-m-d H:i', $r_res['deltime']) . '</td><td><a href="?p=' . $page . '&amp;hf=' . $r_res['jpid'] . '">恢复</a> | <a href="?p=' . $page . '&amp;del=' . $r_res['jpid'] . '" onclick="if(!confirm(\'确定删除?\'))return false;" style="color: #f00;">完全删除</a></td></tr>';
     $i++;
 } while ($r_res = mysql_fetch_assoc($res));
 mysql_free_result($res);
 if ($tp_res > 1) {
     $paa[] = yjl_getpage($page, $tp_res);
 }
Пример #2
0
     $a[$r_res['qzid']][] = '<a href="' . $f . '?id=' . $r_res['qzid'] . '&amp;delwt=1" onclick="if(!confirm(\'确认删除?\'))return false;" style="color: #f00;">删除</a>';
 }
 if ($user_id > 0 && isset($_GET['delhf']) && intval($_GET['delhf']) > 0) {
     $qztid = intval($_GET['delhf']);
     $q_reu = sprintf('select qztid, tid, uid from %s where qzid=%s and qztid=%s limit 1', $yjl_dbprefix . 'qz_topic', $r_res['qzid'], $qztid);
     $reu = mysql_query($q_reu) or die('');
     $r_reu = mysql_fetch_assoc($reu);
     if (mysql_num_rows($reu) > 0) {
         if ($udb['qx'] == 10 || $udb['isxg'] > 0 || $user_id == $r_reu['uid']) {
             if ($r_reu['tid'] > 0) {
                 $q_rep = sprintf('select b.nickname, b.password, c.app_key, c.app_secret from %s as a, %s as b, %s as c where a.tid=%s and a.uid=b.uid and a.item_id=c.id', $dbprefix . 'topic_api', $dbprefix . 'members', $dbprefix . 'app', $r_reu['tid']);
                 $rep = mysql_query($q_rep) or die('');
                 $r_rep = mysql_fetch_assoc($rep);
                 if (mysql_num_rows($rep) > 0) {
                     require_once 'lib/jishigouapi.class.php';
                     $JishiGouAPI = new JishiGouAPI($yjl_url . $yjl_tpath . 'api.php', $r_rep['app_key'], $r_rep['app_secret'], $r_rep['nickname'], md5($r_rep['nickname'] . $r_rep['password']));
                     $jsg_result = $JishiGouAPI->DeleteTopic($r_reu['tid']);
                 }
                 mysql_free_result($rep);
                 $dSQL = sprintf('delete from %s where qztid=%s', $yjl_dbprefix . 'qz_topic', $r_reu['qztid']);
                 $result = mysql_query($dSQL) or die(mysql_error());
             }
         }
     }
     mysql_free_result($reu);
     echo '<script type="text/javascript">location.href=\'faq-' . $r_res['qzid'] . '.html\';</script>';
     exit;
 }
 $c .= '<p class="other">' . (isset($a[$r_res['qzid']]) ? '<span>' . join('|', $a[$r_res['qzid']]) . '</span>' : '') . yjl_wbdate($r_res['dateline']) . '</p></div></li></ul>';
 if ($user_id > 0 && ($user_id == $r_res['uid'] || $uadb[$user_id]['qx'] == 5 && $udb['iszxjl'] > 0 && ($user_id == $r_res['jluid'] || $r_res['jluid'] == 0))) {
     $isupimg = 1;
Пример #3
0
         $address = htmlspecialchars(trim($_POST['address']), ENT_QUOTES);
         $iSQL = sprintf('insert into %s (uid, jluid, xqid, name, content, c_cy, isgf, isxzrs, xzrs, datetime, sjtid, cs, etime, address, lasttime) values (%s, %s, %s, %s, %s, 1, %s, %s, %s, %s, %s, %s, %s, %s, %s)', $yjl_dbprefix . 'hd', $user_id, $jluid, $hxqid, yjl_SQLString($name, 'text'), yjl_SQLString($content, 'text'), $isgf, $isxzrs, $xzrs, $datetime, $sjtid, $cs, $etime, yjl_SQLString($address, 'text'), time());
         $result = mysql_query($iSQL) or die('');
         $hdid = mysql_insert_id();
         yjl_addlog('[uid]创建活动:<a href="active-' . $hxqid . '-' . $hdid . '.html">' . $name . '</a>', md5('cjhd|' . $user_id . '|' . $user_id . '|' . $hdid));
         if ($hxqid > 0) {
             $uSQL = sprintf('update %s set c_hd=c_hd+1 where xqid=%s', $yjl_dbprefix . 'xq', $hxqid);
             $result = mysql_query($uSQL) or die('');
         }
         $iSQL = sprintf('insert into %s (uid, hdid, datetime) values (%s, %s, %s)', $yjl_dbprefix . 'hd_user', $user_id, $hdid, time());
         $result = mysql_query($iSQL) or die('');
         $app_a = yjl_app('活动 ' . $name, $hdid, $yjl_url . 'active-' . $hxqid . '-' . $hdid . '.html', 'hd');
         $uSQL = sprintf('update %s set app_id=%s where hdid=%s', $yjl_dbprefix . 'hd', $app_a[0], $hdid);
         $result = mysql_query($uSQL) or die('');
         require_once 'lib/jishigouapi.class.php';
         $JishiGouAPI = new JishiGouAPI($yjl_url . $yjl_tpath . 'api.php', $app_a[1], $app_a[2], $udb['nickname'], md5($udb['nickname'] . $udb['password']));
         $content = '添加活动:' . $_POST['name'] . ' ' . $yjl_url . 'active-' . $hxqid . '-' . $hdid . '.html';
         $jsg_result = $JishiGouAPI->AddTopic($content);
         if (!isset($jsg_result['error']) && isset($jsg_result['result']['tid'])) {
             $tid = $jsg_result['result']['tid'];
             $uSQL = sprintf('update %s set tid=%s, uname=%s where hdid=%s', $yjl_dbprefix . 'hd', $tid, yjl_SQLString($udb['username'], 'text'), $hdid);
             $result = mysql_query($uSQL) or die('');
             yjl_uwb($user_id, $content . ' ' . $yjl_url . 'active-' . $hxqid . '-' . $hdid . '.html', $tid);
         }
         echo '<script type="text/javascript">location.href=\'' . $f . '?xqid=' . $hxqid . '&id=' . $hdid . '\';</script>';
     } else {
         echo '<script type="text/javascript">location.href=\'' . $f . '?xqid=' . $xqid . '\';</script>';
     }
     exit;
 }
 $is_mce = 1;