Thread: Mys 1.3.1 Group sort
View Single Post
  #10  
Old 05-05-2012, 10:15 AM
Aasixx's Avatar
Aasixx Aasixx is offline
.. your friendly geek. c:
 
Join Date: Nov 2011
Location: somewhere ur not.
Posts: 191
Gender: Female
Credits: 27,193
Aasixx is on a distinguished road
Default

When you say "leave them in public_html" do you mean create a new file for each one? So, like for "creategroup" after I downloaded and opened it, it gave me this code:

Code:
<?php

include("functions/functions.php");
include("functions/functions_users.php");
include("functions/functions_adopts.php");
include("inc/lang.php");

//***************//
//  START SCRIPT //
//***************//

$name = $_GET["name"];
$submit = $_GET["submit"];

if($isloggedin == "yes"){
if($submit == "Create"){
		$count = $GLOBALS['adopts']->select("pet_groups", array(), "user='{$loggedinname}'")->fetchAll();
		if(count($count) > 4) {
		$article_title = "Sorry";
		$article_content = "You have too many groups. <br><br>
		<a href='mygroups.php'>Go back to the group center</a>";
		}
		else{
		// Create group!
                $adopts->insert("pet_groups", array("id" => NULL, "user" => $loggedinname, "name" => $name));
                $group = $adopts->select("pet_groups", array(), "name='{$name}' and user='{$loggedinname}'")->fetchObject();	
                $id = $group->id;
        $article_title = "New Group!";
	$article_content = "You have just created a new group - {$name}!<br><br>
	<a href='groups.php?id={$id}'>Click here to see it.</a>";
		}
}
		else{
	$article_title = "";
	$article_content = "";
		}
} // End the log in check IF
else {
	$article_title = "Login";
	$article_content = "You must login to create a group.";
} // End the log in check ELSE 

//***************//
//  OUTPUT PAGE  //
//***************//

echo showpage($article_title, $article_content, $date);

?>
Would I need to create a new file and put that code in it for creategroup?
__________________
Reply With Quote