//http://www.PCWize.com/thebat //Last updated: 12 Jul 04 //This is the only file you should need to edit for all the important variables //used throughout the pages with exception to the Zipit.bat. The only other //edits you might want to do are for language localization or wordsmithing. //Below is a list of all the files you'll need and what they're for. //Account.php - This is the meat of the application. Everything to do with the // user's account is here. //Admin.php - This is the page which displays user's awaiting approval for their // image upload. It is assumed that if you do not check the "Approved" // box, that you are disapproving them when you submit the form. This // will soon be replaced by a modified version of PCWAdmin.php. //Auth.php - This is the script that enforces authentication on the Admin.php // page. You can use this script by including it in any page. //Create.php - This is the page that allows them to create an account. //ForgotPass.php - This is the page to e-mail the user their password if they // forgot it. //Getrogue.php - This is the page which TheBat hits when it needs to auto-download // an image. Be careful modifying this file as it could easily // break the TheBat functionality. //Index.php - This is the login and about page. //Rogues.php - This is the page that displays the moderators and users. The // moderators are displayed regardless of their setting for the // 'Display in Gallery' option. The users will *only* be displayed // if they've chosen the option to have their image appear in the // gallery, *and* only if their image has been approved. //Rogues.txt - This is the template file for the .MSL. It gets copied from this // into the $imagedir folder each time a new ZIP is created. //Verify.php - This is the page to authenticate a user via session variables. //Zipit.bat - This file is the shell script to run your ZIP program. You'll need // to modify it so that it uses whichever ZIP program you use with the // right switches. It is defaulted to use 7Zip, and assumes 7Zip is // in the System PATH. //Define your variables for the database and connect to the database $dbserver="localhost"; $dbuser="pcwize"; $dbpassword="123poi098"; $dbname="pcwize"; $tblname="tbsmileys"; $conn=mysql_connect($dbserver,$dbuser,$dbpassword) or die("Unable to connect to DB"); $select=mysql_select_db($dbname, $conn) or die("Unable to open DB"); //Define your website address where the index.php page is. //Don't forget the trailing forward slash. $siteaddress = "http://www.pcwize.com/thebat/"; //Define the name of your Emoticons Site $sitename = "Roguemoticons"; //Who do you want all e-mails from this script to come from $mailname="Leif Gregory"; $mailfrom="Rogues@Pcwize.com"; //Define the filename of the .MSL file $mslfile = "rogues.msl"; //Name of your .MSL template $msltemplate = "rogues.txt"; //Define the filename of the .ZIP file. Don't forget to make this the same as //what you called it in the Zipit.bat file. $zipfile = "Rogues.zip"; //Path to the folder containing the .MSL file and image subdir. //You need the double backslashes and the trailing double backslashes. $msldir = "C:\\apache2\\htdocs\\pcwize\\thebat\\smileys\\"; //Directory that images reside in. This one is used when a full path is needed $imagedir = "rogues\\"; //Relative path to the folder containing images. i.e. it should be inside the //folder that you specified in the $siteaddress variable. This one is used when //only a relative path is needed. $imagesdir = "smileys/rogues/"; //Relative path to the folder containing the ZIP. i.e. it should be inside the //folder that you specified in the $siteaddress variable, but above the folder //you specified in the $imagesdir variable. This one is used when a relative //path is needed $zipdir = "smileys/"; //Define what path uploaded images will be moved into. This is going to be the //same path as $msldir but requires single forward slashes. $movedir = "/apache2/htdocs/pcwize/thebat/smileys/rogues/"; //Define your image upload maximums $image_max_width = "120"; #pixels $image_max_height = "144"; #pixels $image_max_filesize = "10240"; #bytes //Allowed filetypes. This is used to display to a user what filetypes are //allowed in the error message when they upload the wrong type. $allowedtypes = ".GIF and .JPG"; //MIME types to allow for uploads. The default below covers all the possiblities //for .GIF and .JPG $mimetypes = array("image/gif","image/pjpeg","image/jpeg","image/jpg"); //Define your bgcolors for the Account.php and Admin.php pages. $bgcolor1 = "seagreen"; $bgcolor2 = "darkseagreen"; $bgcolor3 = "orange"; #Color to highlight account deletion (Account.php only) //Define the message to mods when an approval is needed. $mod_email_to='tblist-moderators@silverstones.com'; $mod_subject = 'You have a ' . $sitename . ' to approve for ' . $_POST['FName'] . " " . $_POST['LName']; $mod_message = 'Go to ' . $siteaddress . 'admin.php'; //Define the message to users when a new person signs up. $new_subject = 'Someone new has joined or updated their image on ' . $sitename; $new_message = 'Download the latest ' . $siteaddress . $zipdir . $zipfile . ' Here is who joined or updated: '; $new_message_footer = 'You received this e-mail because you opted to be notified when new people sign up to ' . $sitename . ' To opt-out of this, please log into your account at http://www.PCWize.com/thebat and uncheck the box labeled: ' . '"Notify me when a new person signs up for Roguemoticons so I can download the rogues.zip"'; //Define the message to a user when their image has been approved. $approved_subject = 'Your ' . $sitename . ' has been approved!'; $approved_message = 'Click here to download the latest ' . $zipfile . ' containing your ' . $sitename . " from " . $siteaddress . $zipdir . $zipfile . ', then unzip ' . $zipfile . ' into your The Bat! Images directory, and restart TB. Thank you. The ' . $sitename . ' Moderators'; //Define the message to a user when their image has been disapproved. $disapproved_subject = 'Your ' . $sitename . ' was disapproved...'; $disapproved_message = 'One of the moderators disapproved your uploaded image for some reason. It may have been inappropriate or corrupted. Please try again and upload a new image. Thank you. The ' . $sitename . ' Moderators'; //Define your message to a user who has requested a password reminder. $password_subject = 'Password reminder for ' . $sitename . '!'; $password_message = 'Your password is: '; #Password will be appended ?>