require_once '../Classes/ip2c.php';
require_once 'json/JSON.php';
$json = new Services_JSON();
$output;
if (isset($_SESSION['userid']) && isset($_REQUEST['pagename']) && isset($_REQUEST['admin']) && isset($_REQUEST['pagesurl'])) {
    mysql_connect('localhost', 'nizam', 'ajith786') or die("cannot connected");
    mysql_select_db("fztest1") or die("coudnt find database");
    $pagesurl = explode(",", $_REQUEST['pagesurl']);
    $tabs['Related Sites']['type'] = 'links';
    $tabs['Related Sites']['urls'] = $pagesurl;
    $rand = $_REQUEST['pagename'];
    $admins = array($_REQUEST['admin']);
    $creator = $_REQUEST['admin'];
    $ip2c = new ip2c();
    $a = array($_SESSION['userid']);
    if (mysql_query("insert into freniz values('" . $rand . "','page','leaf.php?leafid=" . $rand . "','a:0:{}','" . $_REQUEST['pagename'] . "','" . $ip2c->getIpAdd() . "')")) {
        if (mysql_query("insert into pages (pageid,pagename,type,category,subcategory,creator,admins,vote,date,url,bannedusers) values('" . $rand . "','" . $_REQUEST['pagename'] . "','govt','govt','govt','" . $creator . "','" . serialize($admins) . "','" . serialize($a) . "',now(),'leaf.php?leafid=" . $rand . "','a:0:{}')")) {
            if (mysql_query("insert into pages_info(pageid,info,tabs) values('" . $rand . "','a:0:{}','" . serialize($tabs) . "')")) {
                $results1 = mysql_query("select adminpages from user_info where userid='" . $_REQUEST['admin'] . "'");
                while ($row1 = mysql_fetch_assoc($results1)) {
                    $admins1 = unserialize($row1['adminpages']);
                    array_push($admins1, $rand);
                    if ($_REQUEST['type'] == 'normal') {
                        mysql_query("update user_info set adminpages='" . serialize($admins1) . "' where userid='" . $_REQUEST['admin'] . "'");
                        mysql_query("update freniz set adminpages='" . serialize($admins1) . "' where userid='" . $_REQUEST['admin'] . "'");
                        mysql_query("insert into album (userid,name,date) values('" . $rand . "','pagepics',now())");
                    }
                    $output = $json->encode(array("status" => "success", "leafid" => $rand));
                }
            } else {
                $output = $json->encode(array("status" => "Error occured while creating your leaf", "leafid" => 0));
Exemple #2
0
<?php

require_once 'json/JSON.php';
require_once '../Classes/ip2c.php';
$json = new Services_JSON();
$output;
if (isset($_REQUEST["un"]) && isset($_REQUEST["pass"]) && isset($_REQUEST["fname"]) && isset($_REQUEST["lname"]) && isset($_REQUEST["email"]) && isset($_REQUEST["sex"]) && isset($_REQUEST["bdd"]) && isset($_REQUEST["bdm"]) && isset($_REQUEST["bdy"])) {
    $dob = $_REQUEST["bdy"] . "-" . $_REQUEST["bdm"] . "-" . $_REQUEST["bdd"];
    $ip2c = new ip2c();
    mysql_connect('localhost', 'nizam', 'ajith786') or die("cannot connected");
    mysql_select_db("fztest1") or die("coudnt find database");
    if (mysql_query("insert into freniz values('" . $_REQUEST['un'] . "','user','profile.php?userid=" . $_REQUEST['un'] . "','a:0:{}','" . $_REQUEST['fname'] . " " . $_REQUEST['lname'] . "','" . $ip2c->getIpAdd() . "')")) {
        if (mysql_query("insert into userstable (userid,pass,email) values('" . $_REQUEST['un'] . "','" . $_REQUEST['pass'] . "','" . $_REQUEST['email'] . "')")) {
            $a = array();
            $b = serialize($a);
            if (mysql_query("insert into user_info (userid,fname,lname,dob,sex,email,date,musics,books,movies,games,celebrities,other,pinnedpic,sports,playlist,school,college,language,adminpages,employer,url,blocklist,blockedby,reviews,reqfrmme) values('" . $_REQUEST['un'] . "','" . $_REQUEST['fname'] . "','" . $_REQUEST['lname'] . "','" . $dob . "','" . $_REQUEST['sex'] . "','" . $_REQUEST['email'] . "',now(),'" . $b . "','" . $b . "','" . $b . "','" . $b . "','" . $b . "','" . $b . "','" . $b . "','" . $b . "','" . $b . "','" . $b . "','" . $b . "','" . $b . "','" . $b . "','" . $b . "','profile.php?userid=" . $_REQUEST['un'] . "','a:0:{}','a:0:{}','a:0:{}','a:0:{}')")) {
                if (mysql_query("insert into apps values('" . $_REQUEST['un'] . "','" . $b . "','" . $b . "','" . $b . "')")) {
                    $a1 = array();
                    $b1 = array('post', 'image', 'admire', 'pin', 'video');
                    foreach ($b1 as $c1) {
                        $a1[$c1] = array();
                    }
                    $d1 = serialize($a1);
                    if (mysql_query("insert into friends_vote (userid,friendlist,incomingrequest,sentrequest,vote,voted) values('" . $_REQUEST['un'] . "','" . $b . "','" . $b . "','" . $b . "','" . $b . "','a:0:{}')") && mysql_query("insert into privacy (userid,postignore,testyignore,postspeci,testyspeci,blogspeci,posthidden,testyhidden,bloghidden,autoacceptusers,blockactivityusers,hidestreams,hideusersstream) values('" . $_REQUEST['un'] . "','a:0:{}','a:0:{}','a:0:{}','a:0:{}','a:0:{}','a:0:{}','a:0:{}','a:0:{}','" . $d1 . "','" . $d1 . "','a:0:{}','a:0:{}')")) {
                        if (mysql_query("insert into album (userid,name,date,specificlist,hiddenlist,ignorelist) values('" . $_REQUEST['un'] . "','Profilepics',now(),'a:0:{}','a:0:{}','a:0:{}')")) {
                            $albumid = mysql_insert_id();
                            mysql_query("insert into album (userid,name,date,specificlist,hiddenlist,ignorelist) values('" . $_REQUEST['un'] . "','SecondaryProfilepics',now(),'a:0:{}','a:0:{}','a:0:{}')");
                            $secalbum = mysql_insert_id();
                            mysql_query("insert into album (userid,name,date,specificlist,hiddenlist,ignorelist,canupload) values('" . $_REQUEST['un'] . "','Chart Pics',now(),'a:0:{}','a:0:{}','a:0:{}','friends')");
                            if (mysql_query("update user_info set propicalbum='" . $albumid . "',secondarypicalbum='{$secalbum}' where userid='" . $_REQUEST['un'] . "'") && mysql_query("insert into notification values('" . $_REQUEST['un'] . "','a:0:{}')")) {
                                $output = $json->encode(array("status" => "success", "html" => "Your Account has been Created Successfully"));