if (!$confirm) { $x_body .= "\r\n\t\t\t\t\t<form action='index.php' method='post'>\r\n\t\t\t\t\t<input type='hidden' name='rub' value='{$rub}'>\r\n\t\t\t\t\t<input type='hidden' name='asa' value='del'>\r\n\t\t\t\t\t<input type='hidden' name='saryid' value='{$saryid}'>\r\n\t\t\t\t\t\t<table cellspacing='0' cellpadding='0' align=center border='0'>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td colspan='3' align='center'>\r\n\t\t\t\t\t\t\t\tTianao hofafaina tokoa ve io sary io ?\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t"; if ($admin[sary][level] >= LEVEL_DEL && $uid != $USER->uid) { $x_body .= "\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td colspan='3' align='center'>\r\n\t\t\t\t\t\t\tIanao dia mpitantana ny sehatra. Ampidiro eto ambany <b>amim-panajana </b>ny antony hanesoranao an'io sarin'ny namana io hampitaina aminy. <br>\r\n\t\t\t\t\t\t\t\t<textarea name='antony' rows='5' cols='25'>Manahoana \n Voatery nesorina ny sary napetrakao satria tsy mifanaraka amin'ny zavatra ilainay.</textarea>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t"; } $x_body .= "\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td align='right' valign='top'>\r\n\t\t\t\t\t\t\t<input type='submit' name='confirm' value=\" Tsia \">\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td> </td>\r\n\t\t\t\t\t\t<td align='left' valign='top'>\r\n\t\t\t\t\t\t\t<input type='submit' name='confirm' value=\" Eny \">\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t</table><br><br>\r\n\t\t\t\t\t</form>\r\n\t\t\t\t\t"; } elseif (trim($confirm) == "Eny") { if ($sary = $DB->get_row("SELECT * FROM #__namana_sary WHERE saryid='{$saryid}' LIMIT 1")) { $ftp_server = $sary->ftp_server; $ftp_user_name = $sary->ftp_user_name; $ftp_user_pass = $sary->ftp_user_pass; $ftp_dir = $sary->ftp_dir; $rst = $DB->query("DELETE FROM #__namana_sary WHERE saryid='{$saryid}'"); $rst = $DB->query("DELETE FROM #__namana_sary_comments WHERE saryid='{$saryid}'"); $query = $DB->query("UPDATE #__namana_user_profile SET sary =" . $DB->get_var("SELECT count(*) FROM #__namana_sary WHERE uid='{$sary->uid}'") . " WHERE uid='{$sary->uid}' LIMIT 1"); delete_pic($sary->saryfile); if ($sary->uid == $USER->uid) { // ny tompony no mamafa $message = "Miarahaba an'i {$USER->user},\n\nAraka ny fangatahanao dia nesorina ny sarinao iray.\n\nRaha mbola te hampiditra sary dia ao amin'ny\n\nhttp://namana.serasera.org/?rub=namana/sary\nMisaotra betsaka."; $subject = "Sary nesorina"; send_mail($USER->user . "<" . $USER->email . ">", $subject, $message); $message = "Nesorin'i {$USER->user} ny sariny"; $subject = "[Admin sary] Sary nesorina"; send_mail("<*****@*****.**>", $subject, $message); $x_body .= "Voafafa ny sary."; } else { // admin no mamafa if ($tompony = $DB->get_row("SELECT * FROM #__namana_user_profile WHERE uid='" . $sary->uid . "' LIMIT 1")) { $x_body .= "Voafafa ny sary. Nandefasana hafatra ny tompon'ny sary."; $message = "Miarahaba an'i {$tompony->user},\n\nIalana tsiny fa voatery nofafain'i {$USER->user} ny sarinao.\nIty ambany ity ny antony nanesorany azy :\n\n[b]" . $antony . "[/b]\n\nRaha mbola te hampiditra sary dia ao amin'ny\n\nhttp://namana.serasera.org/?rub=namana/sary\nMisaotra betsaka."; $subject = "Sary nesorina";
|**************************************************************************************************/ include "include/config.php"; include "include/functions/import.php"; $thebaseurl = $config['baseurl']; $SID = intval($_SESSION['USERID']); STemplate::assign('SID', $SID); if ($SID > 0) { $d = intval($_REQUEST['d']); $did = intval($_REQUEST['did']); if ($d == "1") { if ($did > 0) { $queryd = "select PID from posts where USERID='" . mysql_real_escape_string($SID) . "' AND PID='" . mysql_real_escape_string($did) . "'"; $executequeryd = $conn->execute($queryd); $DPID = intval($executequeryd->fields['PID']); if ($DPID > 0) { delete_pic($DPID); $msg = $lang['226']; } } } $query = "select A.USERID, A.PID, A.ptitle, A.pic, A.pkey, A.price, A.youtube, C.bname from posts A, boards C WHERE A.active='1' AND A.BID=C.BID AND A.USERID='" . mysql_real_escape_string($SID) . "' order by A.points desc, A.viewcount desc, A.PID desc limit 50"; $results = $conn->execute($query); $pins = $results->getrows(); if (count($pins) >= 50) { STemplate::assign('more', 1); } } else { header("Location:" . $thebaseurl . "/login"); exit; } STemplate::assign('pagetitle', stripslashes($lang['218']));
$uppic = update_pic($post_data, 'http://172.18.1.23:8081/' . $fid); $uppicobj = json_decode($uppic); if ($uppicobj->size > 0) { $new_pic = 'http://file.fujinde.com:8081/' . $fid; $resJson = array('headurl' => $new_pic, 'nickname' => "", 'age' => "", 'sex' => '', 'zhiye' => "", 'qianming' => ""); /****方案二,图片上传后吧原来的删掉***/ $is_weed = $db->row_select_one("user", "umd5 = '{$u_pic_user}'", "headurl"); $pos = strpos($is_weed['headurl'], "file.fujinde.com:8081"); if ($pos) { //print_r(delete_pic($is_weed['headurl'])); $old_temp = $is_weed['headurl']; } $update = array("headurl" => $new_pic); $db->row_update('user', $update, "umd5 = '{$u_pic_user}' "); //需要改成内部服务器地址 delete_pic(str_replace('file.fujinde.com', '172.18.1.23', $old_temp)); //delete_pic('http://172.18.1.23:8081/4,79688abbdd'); json('yes', '上传成功', $resJson); } else { json('no', '上传失败', ''); } // $uppicobj->name // $uppicobj->size // {"name":"xinput1_3.dll","size":81768} /*****上传至weed服务器end*****/ /***存储到本服务器start*** / if(move_uploaded_file($tmpfile,$myfile)){ $resJson = array( 'headurl' => "http://180.153.40.16:600/zaina/".$myfile, 'nickname' => "", 'age' => "",
function delete_board($did) { global $config, $conn; $SID = intval($_SESSION['USERID']); if (intval($did) > 0) { $queryd = "select BID from boards where USERID='" . mysql_real_escape_string($SID) . "' AND BID='" . mysql_real_escape_string($did) . "'"; $executequeryd = $conn->execute($queryd); $DBID = intval($executequeryd->fields['BID']); if ($DBID > 0) { $queryd = "select PID from posts where USERID='" . mysql_real_escape_string($SID) . "' AND BID='" . mysql_real_escape_string($DBID) . "'"; $resultsd = $conn->execute($queryd); $dpins = $resultsd->getrows(); foreach ($dpins as &$value) { $DPID = $value['PID']; delete_pic($DPID); } $query = "DELETE FROM boards WHERE USERID='" . mysql_real_escape_string($SID) . "' AND BID='" . mysql_real_escape_string($did) . "'"; $conn->Execute($query); $query = "DELETE FROM activity WHERE atype='folb' AND FOLB='" . mysql_real_escape_string($did) . "'"; $conn->Execute($query); } } }