public function __construct() { global $CTM_Template; $CTM_ScreenShots = new CTM_ScreenShots(); $this->Warning(); $this->Castle_Siege(); $CTM_Template->Set("Show_News", constant("Show_News") == TRUE ? $this->Show_News() : NULL); $CTM_Template->Set("Board_News", constant("Board_News") == TRUE ? $this->Board_News() : NULL); $CTM_Template->Set("Top_Home#Resets_MResets", constant("Top_Resets") == TRUE ? $this->Top_Home("Resets_MResets") : NULL); $CTM_Template->Set("Top_Home#RDay_RWeek_RMonth", constant("Top_RDayRWeekRMonth") == TRUE ? $this->Top_Home("ResetsDay_ResetsWeek_ResetsMonth") : NULL); $CTM_Template->Set("Top_Home#PK_Hero", constant("Top_PKHero") == TRUE ? $this->Top_Home("PK_Hero") : NULL); $CTM_Template->Set("Top_Home#Guilds", constant("Top_Guilds") == TRUE ? $this->Top_Home("Guilds") : NULL); $CTM_Template->Set("ScreenShots", constant("Show_ScreenShots") == TRUE ? $CTM_ScreenShots->Recents_ScreenShots() : NULL); }
private function Delete_ScreenShot() { global $CTM_Template, $CTM; $Find_Screens = $this->Query("SELECT * FROM dbo.{$CTM[20]} WHERE Account='{$this->Login}' ORDER BY Votes DESC, Id DESC"); $Check = $this->NumRow($Find_Screens); if ($Check < 1) { exit("<div class=\"info-box\"> Você não adiciono ScreenShots no momento.</div>"); } while ($ScreenShot = $this->FetchArray($Find_Screens)) { $Text = $ScreenShot["Votes"] > 0 ? "Votos" : "Voto"; if ($WzAG == 0) { $Return .= "<table border=\"0\" cellpadding=\"0\" cellpadding=\"2\" cellspacing=\"2\">\r\n\t\t\t\t\t\t<tr>\n"; } $Return .= "<td style=\"width: 110px;\"><table border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td style=\"width: 18px;\" align=\"center\"><a href=\"javascript: void(EffectWeb);\" onclick=\"CTM_Load('?pag=paneluser&str=DELETE_SCREEN&cmd=true&id=" . $ScreenShot["Id"] . "', 'Command', 'GET');\" style=\"color: #666666;\">Autor: " . $ScreenShot["User_Char"] . " <img src=\"" . constant("Upload_SS") . $ScreenShot["ScreenShot"] . "\" width=\"120\" height=\"120\" style=\"border: 1px solid #B3B3B3;\" class=\"image\" /><br />(" . $ScreenShot["Votes"] . " " . $Text . ")</a></td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t</table></td>"; $WzAG++; if ($WzAG > 2) { $Return .= "\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</table>"; $WzAG = 0; } } if ($_GET["cmd"] == TRUE) { $Id = $_GET["id"]; $Find_File = $this->FetchQuery("SELECT ScreenShot FROM dbo.{$CTM[20]} WHERE Id='{$Id}'"); $CTM_ScreenShots = new CTM_ScreenShots(); $CTM_ScreenShots->Variable_1 = $Id; $CTM_ScreenShots->Variable_2 = $Find_File[0]; $CTM_ScreenShots->Variable_3 = FALSE; $CTM_ScreenShots->Delete_ScreenShot(); $this->WriteLog("DELETE_SCREEN", "Arquivo: " . $Find_File[0]); exit("<div class=\"success-box\"> ScreenShot deletada com Sucesso!</div>"); } else { $CTM_Template->Set("%ScreenShot_List%", $Return); } unset($Return); }