Jump to content
MakeWebGames

Sim

Members
  • Posts

    2,392
  • Joined

  • Last visited

  • Days Won

    62

Everything posted by Sim

  1. Sim

    Facebook Register?

    Anyone every do this? Where do I begin?
  2. Code Sample: <? include "../includes/constants.php"; class category { //vars private $db; private $smarty; public function __construct($dbRef, $smartyRef) { //vars $this->db = $dbRef; $this->smarty = $smartyRef; //if adding a category if(isset($_POST['SubmitForm'])) { $this->AddCategory($_POST['textCat'], $_POST['select'], $_POST['textDesc'],$_POST['selectLogin'], "new"); } //see what we are doing here... switch ($_GET['what']) { case "add"; $this->displayAddCategory(0); $this->smarty->assign("site_page", "Add category"); break; case "manage"; if(isset($_POST['StartEditDetails'])) { $this->displayEditDetails($this->db->escape($_POST['hidden'])); } elseif(isset($_POST['StartDelete'])) { $this->displayConfirmDelete(); } elseif(isset($_POST['ConfirmDelete'])) { $this->proccessDelete(); $this->displayCategoryListings(); } elseif(isset($_POST['EditDetails'])) { $this->AddCategory($_POST['textCat'], $_POST['select'], $_POST['textDesc'],$_POST['selectLogin'], "edit"); } else { $this->smarty->assign("site_page", "Manage Categories"); $this->displayCategoryListings(); } break; } } //delete categories and file's public function proccessDelete() { //current category $rec = $this->db->fetch("SELECT catSubID, catTitle FROM " . CAT_TABLE . " WHERE catID='" . $this->db->escape($_POST['hidden']) . "'"); $rows = $this->db->fetch_array("SELECT imageID, imageFileType FROM " . IMAGE_TABLE . " WHERE imageCatID='" . $rec['catSubID'] . "'"); //delete current category images foreach($rows as $rec2) { unlink("../images/" . $rec2['imageID'] . '.' . $rec2['imageFileType']); } //get sub categories $recs = $this->db->fetch("SELECT COUNT(catID) AS ammount FROM " . CAT_TABLE . " WHERE catSubID='" . $this->db->escape($_POST['hidden']) . "'"); //if sub categories if($recs['ammount'] > 0) { //set some default values.. $cont = false; $max = 1; $i = 0; $IDS[] = $this->db->escape($_POST['hidden']); //loop threw all words while($max > $i) { $rec = $this->db->fetch("SELECT *, COUNT(catID) AS amount FROM " . CAT_TABLE . " WHERE catSubID='" . $IDS[$i] . "'"); $msg .= $rec['catTitle'] . " Category and Images deleted...<br>"; if($rec['amount'] > 0) { $IDS[] = $rec['catID']; $max++; } $i++; } //loop threw all cat ids to be deleted for($i=0; $i<count($IDS);$i++) { //get all images associated with category being deleted $rows = $this->db->fetch_array("SELECT imageID, imageFileType FROM " . IMAGE_TABLE . " WHERE imageCatID='" . $IDS[$i] . "'"); //cycle threw all image records foreach($rows as $rec) { //if file exists if(is_file("../images/" . $rec['imageID'] . '.' . $rec['imageFileType'])) { //delete image file unlink("../images/" . $rec['imageID'] . '.' . $rec['imageFileType']); } } //delete records $this->db->del("DELETE FROM " . CAT_TABLE . " WHERE catID='" . $IDS[$i] . "'"); $this->db->del("DELETE FROM " . IMAGE_TABLE . " WHERE imageCatID='" . $IDS[$i] . "'"); } } //first category.. delete from $this->db->del("DELETE FROM " . IMAGE_TABLE . " WHERE imageCatID='" . $this->db->escape($_POST['hidden']) . "'"); $this->db->del("DELETE FROM " . CAT_TABLE . " WHERE catID='" . $this->db->escape($_POST['hidden']) . "'"); $this->smarty->assign("msg", $msg); } //display confirm delete buttton public function displayConfirmDelete() { $this->smarty->assign("delete", 'y'); $this->smarty->assign("id", $_POST['hidden']); } //display details to edit public function displayEditDetails($id) { //query $rec = $this->db->fetch("SELECT catID, catSubID, catSubID, catTitle, catDesc, catReqLogin FROM " . CAT_TABLE . " WHERE catID='$id'"); //set template vars $this->smarty->assign("edit", 'y'); $this->smarty->assign("id", $rec['catID']); $this->smarty->assign("name", $rec['catTitle']); $this->smarty->assign("desc", $rec['catDesc']); $this->smarty->assign("login_" . $rec['catReqLogin'], "selected"); //list categories $this->displayAddCategory($rec['catSubID']); } //attempt to add category public function addCategory($cat_name, $select, $desc, $login_req, $action) { //query to check if category name exists for sub category if one selected.. $rec = $this->db->fetch("SELECT COUNT(*) AS ammount FROM " . CAT_TABLE . " WHERE catTitle='" . $this->db->escape($cat_name) . "' AND catSubID='" . $this->db->escape($select) . "'"); //setup data $data = array("catTitle" => $cat_name, "catDesc" => $desc,"catReqLogin" => $login_req, "catSubID" => $select, "catDate" => time()); if($action == "edit") { //update record $this->db->update(CAT_TABLE, $data, "catID='" . $_POST['hidden'] . "'"); $this->smarty->assign("msg", "<BR>Category updated..."); $this->displayCategoryListings(); } //category doesn't exist, create it if($rec['ammount'] == 0 && $action == "new") { //insert data $this->db->insert(CAT_TABLE, $data); $this->smarty->assign("msg", "<BR>Category created..."); } elseif($action == "new") { $this->smarty->assign("msg", "<BR>Category name allready exists..."); } } //display categories for category add form public function displayAddCategory($selected) { //query $rows = $this->db->fetch_array("SELECT catID, catSubID, catTitle FROM " . CAT_TABLE . " ORDER BY catTitle"); $selects[0] = "None"; //loop through records foreach($rows as $rec) { $selects[$rec['catID']] = $rec['catTitle']; } //set template var $this->smarty->assign("selects", $selects); $this->smarty->assign("selected", $selected); } //display all categories with some stats public function displayCategoryListings() { $Data = array(); //query $rows = $this->db->fetch_array("SELECT * FROM " . CAT_TABLE . " ORDER BY catTitle"); //loop through records foreach($rows as $rec) { //set data for category in template $Data[] = array('name' => $rec['catTitle'], 'login_req' => $rec['catReqLogin'], 'id' => $rec['catID'], 'downloads' => $row['ammount'], 'views' => $rec['catViews'], 'description' => $rec['catDesc']); } //assign template vars $this->smarty->assign("looper", $Data); $this->smarty->assign("list", 'y'); } } ?>
  3. Demo Page: http://www.cellphonerpg.info/vGallery/ Price: $12.00 vGallery Thank you for coming to help me with a few things in the vGallery script I am developing. The vGallery script is set up for one user to be able to create there own personal website gallery online. Everything is coded using with some Object Oriented Programming Methods. You could also create other admin's if you truely wanted to from phpMyAdmin to give them admin powers as well.   Who is the Virtual Gallery Script for? * Artists * Website Owners * Beginner/Novice php/mySQL programmers What kind of Features are given to Members? * User Login * User Logout * User Registration * User Profile's * User Stats * Image Comment System * Image Rating System * Image View Count * Category View Count * Forgot Password * Categories and Multiple category browsing * Site Admin Can... * View Stats * View Script News * Email Members (3 seperate type of emails, active, inactive or all) * Edit News * Edit Categories * Add/Edit Categories * Add/Edit Pending Comments * Add/Edit Images misc info Script uses smarty templating Thanks for reading guy's... thats it for now.. check it out.. PM me or leave your username here and i'll make you admin to check out the script if your interested.. Also, you can add me on msn; contact+orpgcreator.com
  4. Awesome. Hey ben, i lost your msn, add me again. its in my sig.
  5. Is this like a one attack hit system or turn based?
  6. My old msn got hijacked. my new msn is contact+orpgcreator.com
  7. I made one a VERRYY long time ago for phpBB2.0 called phpBB Card Duel.. ;-) Id be interested in contributing...
  8. THanks lucky!!!
  9. anyone got a list of cell phone email extensions or know where to find a recent list?
  10. blade, this site is good at burning everyone. Everyone here has an std. lol's... including bertrand. I gave him one from his irc client.
  11. Sim

    Selling uRPG.net

    @modernmafia, no comment.
  12. Sim

    Selling uRPG.net

    Starting BID $50.00 Bid Increments $5.00 BIN: $1,000 I have an awesome 4 letter domain name here which could be used for many various different things here. Could be used for a browser based RPG. A rpg forum. A RPG ezine site or role playing forum sites. Start the bidding. I'll end auction when I find a price I am satisfied with a price I find fit. This domain is posted on several other sites. Will post updates as biding takes off.
  13. New feature added: Task log's. shows successfull and failed attempts at a task for each task attempted.
  14. I am sure you can sell it. I know on some major forums such as phpBB, SMF which are free. People sell there scripts with the install of those softwares BUT they also have a link to download php, smf for free then buy the package seperately.
  15. Yes newttster, I can secure scripts and also all my work is secured.
  16. Looking for work again... Updated main post.
  17. Pff, thats nothing new to me either. I thought he ment aspx wasn't needed.
  18.   Never knew that. Havn't done much .net though. I'm gonna check out the vs express web developer.
  19. Sooner or later. There will be no need for a downloadable version except maybe for modifying the template (which I have an idea for that). The system is set up pretty nice but not everything is implemented and I am not really try to give out much details on the engine design until its complete
  20. Can't you see what it can do from using it? ;-)
  21. So you telling me I can create a whole PC game in vb.net C# with no external librarys and it will generate the html/css/js needed to place it on a site? OR, are you saying it has a built in html/css/js editor?
  22. I had a typo when saying VB.. The thing when using applications on a webpage is that you need a "authentication license" (can't remember real name)... Then embedding it. It would work locally but not on servers. odd stuff trying to get app's to run threw webpages. I believe thats why flash was invented to simplify the task due to the security risk a real application could cause.
  23. CB is used for desktop programming. I'd recommend going with CB.net 2010 express. Just about anything is possible
  24. Thanks Coder. Gives me a little motivation when hearing positive feedback.
  25. What happened to the computer game companies your ran?
×
×
  • Create New...