[ Index ] |
|
Code source de PHP NUKE 7.9 |
1 <?php 2 3 /************************************************************************/ 4 /* Journal § ZX */ 5 /* ================ */ 6 /* */ 7 /* Original work done by Joseph Howard known as Member's Journal, which */ 8 /* was based on Trevor Scott's vision of Atomic Journal. */ 9 /* */ 10 /* Modified on 25 May 2002 by Paul Laudanski (paul@computercops.biz) */ 11 /* Copyright (c) 2002 Modifications by Computer Cops. */ 12 /* http://computercops.biz */ 13 /* */ 14 /* Required: PHPNuke 5.5 ( http://www.phpnuke.org/ ) and phpbb2 */ 15 /* ( http://bbtonuke.sourceforge.net/ ) forums port. */ 16 /* */ 17 /* Member's Journal did not work on a PHPNuke 5.5 portal which had */ 18 /* phpbb2 port integrated. Thus was Journal § ZX created with the */ 19 /* Member's Journal author's blessings. */ 20 /* */ 21 /* To install, backup everything first and then FTP the Journal package */ 22 /* files into your site's module directory. Also run the tables.sql */ 23 /* script so the proper tables and fields can be created and used. The */ 24 /* default table prefix is "nuke" which is hard-coded throughout the */ 25 /* entire system as a left-over from Member's Journal. If a demand */ 26 /* exists, that can be changed for a future release. */ 27 /* */ 28 /* This program is free software. You can redistribute it and/or modify */ 29 /* it under the terms of the GNU General Public License as published by */ 30 /* the Free Software Foundation; either version 2 of the License. */ 31 /************************************************************************/ 32 /* Additional security checking code 2003 by chatserv */ 33 /* http://www.nukefixes.com -- http://www.nukeresources.com */ 34 /************************************************************************/ 35 /* Journal 2.0 Enhanced and Debugged 2004 */ 36 /* by sixonetonoffun -- http://www.netflake.com -- */ 37 /* Images Created by GanjaUK -- http://www.GanjaUK.com */ 38 /************************************************************************/ 39 if ( !defined('MODULE_FILE') ) 40 { 41 die("You can't access this file directly..."); 42 } 43 44 require_once ("mainfile.php"); 45 $module_name = basename(dirname(__FILE__)); 46 get_lang($module_name); 47 48 if (!isset($jid) OR !is_numeric($jid)) { die("No journal specified."); } 49 $pagetitle = "- "._USERSJOURNAL; 50 include ("header.php"); 51 include("modules/$module_name/functions.php"); 52 if (is_user($user)) { 53 cookiedecode($user); 54 $username = $cookie[1]; 55 } 56 startjournal($sitename,$user); 57 58 ##################################################### 59 # Check to see if the current username matches the # 60 # the name of the author recorded in the database. # 61 # If not - inform them that there is a problem and # 62 # to check their current username. # 63 ##################################################### 64 if (is_user($user)) { 65 $jid = intval($jid); 66 $sql = "SELECT * FROM ".$prefix."_journal WHERE jid = '$jid'"; 67 $result = $db->sql_query($sql); 68 while ($row = $db->sql_fetchrow($result)) { 69 $owner = $row['aid']; 70 if ($owner != $username): 71 openTable(); 72 echo ("<div align=center>"._YOUWRONG."</div>"); 73 closeTable(); 74 echo ("<br>"); 75 journalfoot(); 76 die(); 77 endif; 78 $sql = "DELETE FROM ".$prefix."_journal WHERE jid = '$jid'"; 79 $db->sql_query($sql); 80 $sql = "DELETE FROM ".$prefix."_journal_comments WHERE rid = '$jid'"; 81 $db->sql_query($sql); 82 echo ("<br>"); 83 openTable(); 84 echo ("<div align=center>"._ENTRYREMOVED."<br><br>"); 85 echo ("<a href=\"modules.php?name=$module_name&file=edit\">"._RETURNJOURNAL."</a></div>"); 86 closeTable(); 87 } 88 journalfoot(); 89 } else { 90 if (is_admin($admin)) { 91 $sql = "DELETE FROM ".$prefix."_journal WHERE jid = '$jid'"; 92 $db->sql_query($sql); 93 $sql = "DELETE FROM ".$prefix."_journal_comments WHERE rid = '$jid'"; 94 $db->sql_query($sql); 95 echo ("<br>"); 96 openTable(); 97 echo ("<div align=center>"._ENTRYREMOVED."<br><br>"); 98 echo ("<a href=\"modules.php?name=$module_name&file=edit\">"._RETURNJOURNAL."</a></div>"); 99 closeTable(); 100 } 101 journalfoot(); 102 } 103 $pagetitle = "- "._YOUMUSTBEMEMBER.""; 104 $pagetitle = filter($pagetitle, "nohtml"); 105 OpenTable(); 106 echo "<center><b>"._YOUMUSTBEMEMBER."</b></center>"; 107 CloseTable(); 108 include ("footer.php"); 109 die(); 110 111 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 11:11:59 2007 | par Balluche grâce à PHPXref 0.7 |