Exemplo n.º 1
0
 }
 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;
     $js_a = 'upimg_a_0(response);';
Exemplo n.º 2
0
     } 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);
 }
 $c .= '</table>' . (isset($paa) ? '<center>' . join(' | ', $paa) . '</center>' : '') . '<br/>';