]*>.+<\/a>) (?:]*>.+<\/a>) | ([^="\']?)((?:https?|ftp|bf2|):\/\/[^<> \n\r]+) )/iex', '/]*)target="?[^"\']+"?/i', '/]+)>/i', '/(^|\s)(www.[^<> \n\r]+)/iex', '/(([_A-Za-z0-9-]+)(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-]+) (\\.[A-Za-z0-9-]+)*)/iex' ), array( "stripslashes((strlen('\\2')>0?'\\1\\2\\3':'\\0'))", '', "stripslashes((strlen('\\2')>0?'\\1\\2\\3':'\\0'))", "stripslashes((strlen('\\2')>0?'\\0':'\\0'))", ), $text= trim ( strtr ( $text, array ( ':)' => ":)", ':-)' => ":-)", ':p' => ":p", ':P' => ":P", ':-p' => ":-p", ':-P' => ":-P", ':o' => ":o", ':O' => ":O", ':-o' => ":-o", ':-O' => ":-O", ';)' => ";)", ';-)' => ";-)", ';D' => ";D", ';-D' => ";-D", ':D' => ":D", ':-D' => ":-D", ':DD' => ":DD", 'lol' => "LOL", 'LOL' => "LOL", 'Lol' => "LOL", 'LOl' => "LOL", 'loL' => "LOL", 'lOL' => "LOL", 'lOl' => "LOL", 'lol' => "LOL", ':(' => ":(", ':-(' => ":-(", '8)' => "8)", '8-)' => "8-)", 'B)' => "B)", 'B-)' => "B-)", '8|' => "8|", '8-|' => "8-|", 'B|' => "B|", 'B-|' => "B-|", ':*' => ":*", ':-*' => ":-*", ']:(' => "]:(", ']:-(' => "]:-(", '>:(' => ">:(", '>:-(' => ">:-(", ":'(" => ":‘(", ":'-(" => ":‘-(", ':/' => ":/", ':-/' => ":-/", ':|' => ":|", ':-|' => ":-|", ':[]' => ":[]", ':-[]' => ":-[]", ':]' => ":]", ':-]' => ":-]", 'O:)' => "O:)", 'O:-)' => "O:-)", 'o:)' => "o:)", 'o:-)' => "o:-)", 'O?' => "O?", 'o?' => "o?", '-_-[]' => "-_-[]", 'C(_)' => "C(_)", 'c(_)' => "c(_)", '?:)' => "?:)", '?:-)' => "?:-)", ':DDD' => ":DDD", ':-DDD' => ":-DDD", ':[' => ":[", ':-[' => ":-[", ']:)' => "]:)", ']:-)' => "]:-)", '#_#' => "#_#", ':()' => ":()", ':-()' => ":-()", '*_*' => "*_*", ':@' => ":@", ':-@' => ":-@", '?:(' => "?:(", '?:-(' => "?:-(", ':.' => ":.", ':-.' => ":-.", ':DDDD' => ":DDDD", ':O)' => ":O)", ':o)' => ":o)", '<3' => "<3", 'rofl' => "ROFL", 'ROFL' => "ROFL", 'Rofl' => "ROFL", 'ROfl' => "ROFL", 'ROFl' => "ROFL", 'rOFL' => "ROFL", 'roFL' => "ROFL", 'rofL' => "ROFL", 'RoFl' => "ROFL", 'rOfL' => "ROFL", 'rOfl' => "ROFL", 'HEART' => "HEART", 'RofL' => "ROFL", 'rOFl' => "ROFL", 'roFl' => "ROFL", 'LIKE' => "LIKE", 'LIKED' => "LIKED", 'AGGRESSIVE' => "AGGRESSIVE", 'GOOD' => "GOOD", 'NICE' => "NICE", 'ANGEL' => "ANGEL", 'BOMB' => "BOMB", 'BYE' => "BYE", 'CELEBRATE' => "CELEBRATE", 'ENJOY' => "ENJOY", 'CHEERS' => "CHEERS", 'CLAP' => "CLAP", 'CONFUSED' => "CONFUSED", 'COOL' => "COOL", 'CRAZY' => "CRAZY", 'DANCE' => "DANCE", 'BAD' => "BAD", 'DEVIL' => "DEVIL", 'EVIL' => "EVIL", 'FOOL' => "FOOL", 'CUTE' => "CUTE", 'LOVE' => "LOVE", 'MAMBA' => "MAMBA", 'PARDON' => "PARDON", 'ROSE' => "ROSE", 'SECRET' => "SECRET", 'SICK' => "SICK", 'VAVA' => "VAVA", 'MAD' => "MAD", 'WACK' => "WACK", 'YAY' => "YAY", '[b]' => "", '[/b]' => "", '[i]' => "", '[/i]' => "", '[u]' => "", '[/u]' => "", '[small]' => "", '[/small]' => "", '[big]' => "", '[/big]' => "", '[s]' => "", '[/s]' => "", '[quote]' => '
', '[/quote]' => "
", '[url="' => ' '">', "[url='" => " "'>", '[/url]' => "", '[color="' => ' '">', "[color='" => " "'>", '[/color]' => "", '[br]' => "
", '[copy]' => "

", '://' => "://" ) ) ) ); } if (isset($_GET['cc'])) $rdr_c = 'cc'.$_GET['cc']; elseif (isset($_GET['c'])) $rdr_c = 'c'.$_GET['c']; else $rdr_c = ''; if (isset($rdr_c)) $rdr_a = "#$rdr_c"; else $rdr_a = ''; if(isset($_SERVER['HTTP_REFERER'])) $rdr = $_SERVER['HTTP_REFERER'].$rdr_a; else $rdr = ''; if(isset($_GET['url'])) { $URL = $_GET['url']; } else {$URL = ''; die ("

Forbidden: you dont have permission to access this page !
"); } $DT = date ('Y m d'); $result = ""; if(isset($_POST['userShare'])) $post_user = $_POST['userShare']; else $post_user = ''; if(isset($_POST['vercode'])) $post_vercode = $_POST['vercode']; else $post_vercode = ''; if(isset($_POST['code'])) $post_code = $_POST['code']; else $post_code = ''; $ipaddress = $_SERVER["REMOTE_ADDR"]; $ipaddress = trim ( strtr ( $ipaddress, array ( '.' => "_"))); $ipaddress = '11_06_'.$ipaddress.'_1994_01011994_763825439_0_1242_143'; // ----------------- Check Empty Fields ---------------------- // if (is_dir("./sites/$URL/user/$ipaddress")) { if (file_exists ( "./sites/$URL/user/$ipaddress/UName.txt")) { $readUNamefile = fopen("./sites/$URL/user/$ipaddress/UName.txt","r"); rewind($readUNamefile); $readUNameline = fgets($readUNamefile); $user = "$readUNameline"; $post_code = "10"; $post_vercode = "10"; } } else { $user = "$post_user"; $post_vercode = $post_vercode; $post_code = $post_code; } if (file_exists ( "./sites/$URL/users.txt")) { $Usersfile = fopen("./sites/$URL/users.txt","r"); rewind($Usersfile); $Usersline = fgets($Usersfile); } else $Usersline = ''; if (isset($_POST['submitShare'])) { if(!isset($user) || $user == "") { die ("
Error Occured: name field left blank !
click here to continue
"); } elseif (isset($_POST['userShare']) && stristr($Usersline, "$post_user")) { die ("
Error Occured: a user already exists with this name !
click here to continue
"); } elseif(!isset($_POST['commentShare']) || $_POST['commentShare'] == "") { die ("
Error Occured: status field left blank !
click here to continue
"); } elseif(!isset($post_vercode) || $post_vercode == "") { die ("
Error Occured: security code left blank !
click here to continue
"); } elseif(isset($post_vercode) && ( $post_vercode != $post_code )) { die ("
Error Occured: wrong security code entered !
click here to continue
"); } } if (isset($_POST['submitMoreShare'])) { if(!isset($user) || $user == "") { die ("
Error Occured: name field left blank !
click here to continue
"); } elseif (isset($_POST['userShare']) && stristr($Usersline, "$post_user")) { die ("
Error Occured: a user already exists with this name !
click here to continue
"); } elseif(!isset($post_vercode) || $post_vercode == "") { die ("
Error Occured: security code left blank !
click here to continue
"); } elseif(isset($post_vercode) && ( $post_vercode != $post_code )) { die ("
Error Occured: wrong security code entered !
click here to continue
"); } } if (isset($_POST['submitpostShare'])) { if(!isset($user) || $user == "") { die ("
Error Occured: name field left blank !
click here to continue
"); } elseif (isset($_POST['userShare']) && stristr($Usersline, "$post_user")) { die ("
Error Occured: a user already exists with this name !
click here to continue
"); } elseif(!isset($post_vercode) || $post_vercode == "") { die ("
Error Occured: security code left blank !
click here to continue
"); } elseif(isset($post_vercode) && ( $post_vercode != $post_code )) { die ("
Error Occured: wrong security code entered !
click here to continue
"); } } if (isset($_POST['submitPost'])) { if(!isset($user) || $user == "") { die ("
Error Occured: name field left blank !
click here to continue
"); } elseif (isset($_POST['userShare']) && stristr($Usersline, "$post_user")) { die ("
Error Occured: a user already exists with this name !
click here to continue
"); } elseif(!isset($_POST['commentPost']) || $_POST['commentPost'] == "") { die ("
Error Occured: comment field left blank !
click here to continue
"); } elseif(!isset($post_vercode) || $post_vercode == "") { die ("
Error Occured: security code left blank !
click here to continue
"); } elseif(isset($post_vercode) && ( $post_vercode != $post_code )) { die ("
Error Occured: wrong security code entered !
click here to continue
"); } } if(isset($_GET['like'])) { if (!is_dir("./sites/$URL/user/$ipaddress")) { die ("
Error Occured: you must update a status OR upload a pic OR share a post OR comment on a post before liking any post !
click here to continue
"); } $c = $_GET['c']; if (is_dir("./sites/$URL/texts/$c")) { $texDir = "./sites/$URL/texts"; $photo = ""; $fullCom = fopen("$texDir/$c/Comment.txt", "r"); rewind($fullCom); $cline = fgets($fullCom); $userfile = fopen("$texDir/$c/Name.txt","r"); rewind($userfile); $userline = fgets($userfile); $textDir = "./sites/$URL/texts"; } if (is_dir("./sites/$URL/pics/$c")) { $picDir = "./sites/$URL/pics"; $photo = "

"; $fullCap = fopen("$picDir/$c/Caption.txt", "r"); rewind($fullCap); $cline = fgets($fullCap); $userfile = fopen("$picDir/$c/Name.txt","r"); rewind($userfile); $userline = fgets($userfile); $textDir = "./sites/$URL/pics"; } $viewLikes = "$textDir/$c/Unlike.txt"; if (file_exists ( "$viewLikes")) { $viewlikefile = fopen($viewLikes,"r"); rewind($viewlikefile); $viewlikeline = fgets($viewlikefile); if(stristr($viewlikeline, "$user")) die ("
Warning: you have already liked this post !
Note: you cannot like one post twice !
click here to continue
"); } } if(isset($_GET['Plike'])) { if (!is_dir("./sites/$URL/user/$ipaddress")) { die ("
Error Occured: you must update a status OR upload a pic OR share a post OR comment on a post before liking any post !
click here to continue
"); } $c = $_GET['c']; $cc = $_GET['cc']; $viewLikes = "./sites/$URL/share/post/share/$c/$cc/Unlike.txt"; if (file_exists ( "$viewLikes")) { $viewlikefile = fopen($viewLikes,"r"); rewind($viewlikefile); $viewlikeline = fgets($viewlikefile); if(stristr($viewlikeline, "$user")) die ("
Warning: you have already liked this comment !
Note: you cannot like one comment twice !
click here to continue
"); } } $dir = "./sites/$URL"; if (!is_dir($dir)) { mkdir("$dir"); $mainDir = fopen("./sites/$URL/comments.txt", "w") or die ("Unknown Error"); fwrite($mainDir, ""); } $ipdir = "$dir/user"; if (!is_dir("$ipdir")) { mkdir("$ipdir"); } if (!is_dir("$ipdir/$ipaddress")) { mkdir("$ipdir/$ipaddress"); } if (!file_exists ( "$ipdir/$ipaddress/UName.txt")) { $UName = fopen("$ipdir/$ipaddress/UName.txt", "w") or die ("Unknown Error"); fwrite($UName, "$post_user"); } if (!file_exists ( "$ipdir/$ipaddress/Text.txt")) { $Text = fopen("$ipdir/$ipaddress/Text.txt", "w") or die ("Unknown Error"); fwrite($Text, "0"); } if (!file_exists ( "$ipdir/$ipaddress/Pic.txt")) { $Pic = fopen("$ipdir/$ipaddress/Pic.txt", "w") or die ("Unknown Error"); fwrite($Pic, "0"); } if (!file_exists ( "$ipdir/$ipaddress/Share.txt")) { $Share = fopen("$ipdir/$ipaddress/Share.txt", "w") or die ("Unknown Error"); fwrite($Share, "0"); } if (!file_exists ( "$ipdir/$ipaddress/Like.txt")) { $Like = fopen("$ipdir/$ipaddress/Like.txt", "w") or die ("Unknown Error"); fwrite($Like, "0"); } if (!file_exists ( "$ipdir/$ipaddress/Comment.txt")) { $Comment = fopen("$ipdir/$ipaddress/Comment.txt", "w") or die ("Unknown Error"); fwrite($Comment, "0"); } if (!file_exists ( "$ipdir/$ipaddress/Rate.txt")) { $Rate = fopen("$ipdir/$ipaddress/Rate.txt", "w") or die ("Unknown Error"); fwrite($Rate, "60"); } if (!file_exists ( "$ipdir/$ipaddress/Title.txt")) { $Title = fopen("$ipdir/$ipaddress/Title.txt", "w") or die ("Unknown Error"); fwrite($Title, "beginner"); } // ------------ registering user's name ------------ // if ( file_exists ( "./sites/$URL/users.txt" ) ) { $entries = file ( "./sites/$URL/users.txt" ); foreach ( $entries as &$e ) { $e = trim ( $e ); } } else { $entries = array (); } array_unshift ( $entries, $post_user.' ' ); $entries = array_slice ( $entries, 0, 20 ); file_put_contents ( "./sites/$URL/users.txt", implode ( "\n", $entries ) ); // ------------------ Rating ------------------------ // $RateDir = "$ipdir/$ipaddress/Rate.txt"; $TextDir = "$ipdir/$ipaddress/Text.txt"; $PicDir = "$ipdir/$ipaddress/Pic.txt"; $ShareDir = "$ipdir/$ipaddress/Share.txt"; $CommentDir = "$ipdir/$ipaddress/Comment.txt"; $LikeDir = "$ipdir/$ipaddress/Like.txt"; $TitleDir = "$ipdir/$ipaddress/Title.txt"; $Textfile = fopen($TextDir,"r"); rewind($Textfile); $Textline = fgets($Textfile); $TextResult = $Textline; $Picfile = fopen($PicDir,"r"); rewind($Picfile); $Picline = fgets($Picfile); $PicResult = $Picline; $Sharefile = fopen($ShareDir,"r"); rewind($Sharefile); $Shareline = fgets($Sharefile); $ShareResult = $Shareline; $Commentfile = fopen($CommentDir,"r"); rewind($Commentfile); $Commentline = fgets($Commentfile); $CommentResult = $Commentline; $Likefile = fopen($LikeDir,"r"); rewind($Likefile); $Likeline = fgets($Likefile); $LikeResult = $Likeline; // ----------------- Final Result ------------------ // $RateResult = $TextResult + $PicResult + $ShareResult + $CommentResult + $LikeResult; $RateNew = 60 + $RateResult; $Rate = fopen("$RateDir", "w") or die ("Unknown Error"); fwrite($Rate, "$RateNew"); // ------------------- Giving Title ----------------- // if($RateNew < 100) $NewRl = 'beginner'; if($RateNew > 99) $NewRl = 'active sargent'; if($RateNew > 199) $NewRl = 'captain pro'; if($RateNew > 299) $NewRl = 'junior member'; if($RateNew > 399) $NewRl = 'advance member'; if($RateNew > 499) $NewRl = 'super active member'; if($RateNew > 599) $NewRl = 'mr. internet'; if($RateNew > 699) $NewRl = 'junior quantum member'; if($RateNew > 799) $NewRl = 'advance quantum member'; if($RateNew > 899) $NewRl = 'super active quantum member'; if($RateNew > 999) $NewRl = 'mr. share*'; if(isset($_POST['tTitle']) && $_POST['tTitle'] != '') { $tTitle = $_POST['tTitle']; $Title = fopen("$ipdir/$ipaddress/Title.txt", "w") or die ("Unknown Error"); fwrite($Title, "$tTitle"); //header('Location: '.$rdr.''); echo ''; echo "
Success: your designation has been changed !
click here to continue
"; } elseif (isset($_POST['tTitle']) && $_POST['tTitle'] == '') { $Title = fopen("$ipdir/$ipaddress/Title.txt", "w") or die ("Unknown Error"); fwrite($Title, "mr. share*"); echo ''; echo "
Success: your designation has been changed !
click here to continue
"; } else { $Title = fopen("$ipdir/$ipaddress/Title.txt", "w") or die ("Unknown Error"); fwrite($Title, "$NewRl"); } // ------------------------ Setting Gender ------------------------- // if (isset($_POST['gender'])) { $gender = $_POST['gender']; $Gender = fopen("$ipdir/$ipaddress/Gender.txt", "w") or die ("Unknown Error"); fwrite($Gender, "$gender"); echo ''; echo "
Success: your gender has been saved !
click here to continue
"; } // ----------------------------------------------------------------- // $sDir = "$dir/share"; if (!is_dir($sDir)) mkdir("$sDir"); if (!is_dir("$dir/share/half")) mkdir("$dir/share/half"); if (!is_dir("$dir/share/full")) mkdir("$dir/share/full"); $countdir = "$dir/count.txt"; if (file_exists ( "$countdir")) { $countfile = fopen("$countdir","r"); rewind($countfile); $countline = fgets($countfile); $countShares = $countline + 1; } else { $count = fopen("$countdir", "w") or die ("Unknown Error"); fwrite($count, ""); } if (!is_dir("$dir/share/post")) mkdir("$dir/share/post"); if (!file_exists ( "$dir/share/post/count.txt")) { $countII = fopen("$dir/share/post/count.txt", "w") or die ("Unknown Error"); fwrite($countII, ""); } if (isset($_GET['view'])) { if ($_GET['view'] == 'share') { $view = 'share'; } elseif ($_GET['view'] == 'shareMore') { $view = 'shareMore'; } elseif ($_GET['view'] == 'post') { $view = 'post'; } else { $view = ''; } } else { $view = ''; } if(isset($_GET['view']) && ($_GET['view'] == 'share' || $_GET['view'] == 'shareMore')) { if (file_exists ( "$dir/count.txt")) { $countfile = fopen($countdir,"r"); rewind($countfile); $countline = fgets($countfile); $countShares = $countline + 1; $count = fopen("$countdir", "w") or die ("Unknown Error"); fwrite($count, "$countShares"); } } if (isset($_GET['view']) && $_GET['view'] == 'post') { $countdirII = "$dir/share/post/count.txt"; if (file_exists ( "$countdirII")) { $countfileII = fopen("$countdirII","r"); rewind($countfileII); $countlineII = fgets($countfileII); $countSharesII = $countlineII + 1; $countII = fopen("$countdirII", "w") or die ("Unknown Error"); fwrite($countII, "$countSharesII"); } } if($view == 'share') { if (isset($_GET['viewII'])) { $c = $_GET['ccc']; if (is_dir("./sites/$URL/texts/$c")) { $texDir = "./sites/$URL/texts"; $photo = ""; $fullCom = fopen("$texDir/$c/Comment.txt", "r"); rewind($fullCom); $cline = fgets($fullCom); $userfile = fopen("$texDir/$c/Name.txt","r"); rewind($userfile); $userline = fgets($userfile); $textDir = "$dir/texts"; $llike = "shareLike"; } if (is_dir("./sites/$URL/pics/$c")) { $picDir = "./sites/$URL/pics"; $photo = "

"; $fullCap = fopen("$picDir/$c/Caption.txt", "r"); rewind($fullCap); $cline = fgets($fullCap); $userfile = fopen("$picDir/$c/Name.txt","r"); rewind($userfile); $userline = fgets($userfile); $textDir = "$dir/texts"; $llike = "shareLike"; } $s_msgI = substr($cline, 0, 50); $s_msgII = $cline; if($s_msgI == $s_msgII) { $s_msgI = $s_msgI; } else { $s_msgI = trim ( strtr ( $s_msgI, array ( '[' => "{", ']' => "}"))); } $s_msgI = "
shared $userline's post !

$photo
$s_msgI

"; $s_msgII = "
shared $userline's post !

$photo
$s_msgII

"; } if (!isset($_GET['viewII'])) { $textDir = "$dir/texts"; $llike = "shareLike"; $s_msgI =""; $s_msgII = ""; } if (!is_dir($textDir)) mkdir("$textDir"); if (isset($_POST['commentShare'])) { $commentShare = $_POST['commentShare']; } $countdir = "$dir/count.txt"; if (file_exists ( "$countdir")) { $countfile = fopen($countdir,"r"); rewind($countfile); } else $countfile = fopen($countdir,"w"); rewind($countfile); $countline = fgets($countfile); if (!is_dir("$textDir/$countline")) mkdir("$textDir/$countline"); $likedir = "$textDir/$countline/Like.txt"; if (file_exists ( "$likedir")) { $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); } $result= "000"; $date = fopen("$textDir/$countline/Date.txt", "w") or die ("Unknown Error"); fwrite($date, "$DT"); $name = fopen("$textDir/$countline/Name.txt", "w") or die ("Unknown Error"); fwrite($name, "$user"); $smallCom = substr($commentShare, 0, 100); if($smallCom == $commentShare) { $seeMore = ''; $smallCom = $smallCom; } else { $seeMore = '..... continue reading'; $smallCom = trim ( strtr ( $smallCom, array ( '[b]' => "", '[/b]' => "", '[i]' => "", '[/i]' => "", '[u]' => "", '[/u]' => "", '[small]' => "", '[/small]' => "", '[big]' => "", '[/big]' => "", '[s]' => "", '[/s]' => "", '[quote]' => '', '[/quote]' => "", '[url="' => '', '"]' => '', "[url='" => "", "']" => "", '[/url]' => "", '[color="' => '', '"]' => '">', "[color='" => "", "']" => "'>", '[/color]' => "", '[br]' => "", '[copy]' => "", '[/copy]' => "", '://' => "" ))); } if (isset($_GET['viewII'])) { if($smallCom == $commentShare) { $seeMore = ''; $smallCom = $smallCom; } else { $seeMore = '..... continue reading'; $smallCom = $smallCom; } } $smallComment = fopen("$textDir/$countline/Smallcomment.txt", "w") or die ("Unknown Error"); fwrite($smallComment, "$s_msgI$smallCom"); $comment = fopen("$textDir/$countline/Comment.txt", "w") or die ("Unknown Error"); fwrite($comment, "$s_msgII$commentShare"); $Comments = fopen("$textDir/$countline/Comments.txt", "w") or die ("Unknown Error"); fwrite($Comments, ""); $like = fopen("$textDir/$countline/Like.txt", "w") or die ("Unknown Error"); fwrite($like, ""); $unlike = fopen("$textDir/$countline/Unlike.txt", "w") or die ("Unknown Error"); fwrite($unlike, ''); $likedir = "$textDir/$countline/Like.txt"; $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); if (isset($_GET['viewII'])) { $share = ''; $lllike = ' '; $cccomment = ''; if(isset($_GET['rdr_ps '])) $rdr = $_GET['rdr_ps ']; $rdr = trim ( strtr ( $rdr, array ( 'url=' => null, "$URL" => null, "&c=$c" => null, '&view=postShare' => null, '?' => null ))); $rdr = $rdr.'c'.$countline; $CTextDir = "$ipdir/$ipaddress/Share.txt"; $CTextfile = fopen($CTextDir,"r"); rewind($CTextfile); $CTextline = fgets($CTextfile); $CTextNew = $CTextline + 1; $Text = fopen("$CTextDir", "w") or die ("Unknown Error"); fwrite($Text, "$CTextNew"); } else { $share = ' '; $lllike = ' '; $cccomment = ''; $rdr = $rdr.'c'.$countline; $CTextDir = "$ipdir/$ipaddress/Text.txt"; $CTextfile = fopen($CTextDir,"r"); rewind($CTextfile); $CTextline = fgets($CTextfile); $CTextNew = $CTextline + 1; $Text = fopen("$CTextDir", "w") or die ("Unknown Error"); fwrite($Text, "$CTextNew"); } $msg = '
'.$user.'
'.smile_code($s_msgI).smile_code($smallCom).$seeMore.'
'.$DT.' '.$likeline.''.$lllike.''.$cccomment.''.$share.'

'; $content = fopen("$dir/share/half/$countline.txt", "w") or die ("Unknown Error"); fwrite($content, "$msg"); if($likeline == "") $likeline = "0"; $msgII = '
'.$user.'
'.smile_code($s_msgII).smile_code($commentShare).'
'.$DT.'
( '.$likeline.' )'.$lllike.'

'; $contentII = fopen("$dir/share/full/$countline.txt", "w") or die ("Unknown Error"); fwrite($contentII, "$msgII"); //header('Location: '.$rdr.''); echo ''; echo "
Success: your status posted !
click here to continue
"; } if($view == 'shareMore') { $picDir = "$dir/pics"; if (!is_dir($picDir)) mkdir("$picDir"); if (isset($_POST['cap'])) { $cap = $_POST['cap']; } $countdir = "$dir/count.txt"; if (file_exists ( "$countdir")) { $countfile = fopen($countdir,"r"); rewind($countfile); } else $countfile = fopen($countdir,"w"); rewind($countfile); $countline = fgets($countfile); if (!is_dir("$picDir/$countline")) mkdir("$picDir/$countline"); $likedir = "$picDir/$countline/Like.txt"; if (file_exists ( "$likedir")) { $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); } //Check that we have a file if((!empty($_FILES["uploaded_file"])) && ($_FILES['uploaded_file']['error'] == 0)) { //Check if the file is JPEG image and it's size is less than 350Kb $filename = basename($_FILES['uploaded_file']['name']); $ext = substr($filename, strrpos($filename, '.') + 1); if ((($ext == "jpg") && ($_FILES["uploaded_file"]["type"] == "image/jpeg") || ($ext == "png") && ($_FILES["uploaded_file"]["type"] == "image/png") || ($ext == "gif") && ($_FILES["uploaded_file"]["type"] == "image/gif"))) { //Determine the path to which we want to save this file $countdir = "$dir/count.txt"; $countfile = fopen($countdir,"r"); rewind($countfile); $countline = fgets($countfile); if (!is_dir("$picDir/$countline")) mkdir("$picDir/$countline"); $newname = dirname(__FILE__).$picDir.'/'.$countline.'/Photo.png'; //Check if the file with the same name is already exists on the server if (!file_exists($newname)) { //Attempt to move the uploaded file to it's new place if ((move_uploaded_file($_FILES['uploaded_file']['tmp_name'],$newname))) { $result= "000"; $date = fopen("$picDir/$countline/Date.txt", "w") or die ("Unknown Error"); fwrite($date, "$DT"); $name = fopen("$picDir/$countline/Name.txt", "w") or die ("Unknown Error"); fwrite($name, "$user"); $caption = fopen("$picDir/$countline/Caption.txt", "w") or die ("Unknown Error"); fwrite($caption, "$cap"); $smallCap = substr($cap, 0, 50); $smallCaption = fopen("$picDir/$countline/Smallcaption.txt", "w") or die ("Unknown Error"); fwrite($smallCaption, "$smallCap"); $unlike = fopen("$picDir/$countline/Unlike.txt", "w") or die ("Unknown Error"); fwrite($unlike, ""); if($smallCap == $cap) { $seeMore = ''; $smallCap = $smallCap; } else { $seeMore = '..... continue reading'; $smallCap = trim ( strtr ( $smallCap, array ( '[b]' => "", '[/b]' => "", '[i]' => "", '[/i]' => "", '[u]' => "", '[/u]' => "", '[small]' => "", '[/small]' => "", '[big]' => "", '[/big]' => "", '[s]' => "", '[/s]' => "", '[quote]' => '', '[/quote]' => "", '[url="' => '', '"]' => '', "[url='" => "", "']" => "", '[/url]' => "", '[color="' => '', '"]' => '">', "[color='" => "", "']" => "'>", '[/color]' => "", '[br]' => "", '[copy]' => "", '[/copy]' => "", '://' => "" ))); } $Comments = fopen("$picDir/$countline/Comments.txt", "w") or die ("Unknown Error"); fwrite($Comments, ""); $like = fopen("$picDir/$countline/Like.txt", "w") or die ("Unknown Error"); fwrite($like, ""); $likedir = "$picDir/$countline/Like.txt"; $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); $msg = '
'.$user.'
'.smile_code($smallCap).$seeMore.'
'.$DT.' '.$likeline.'

'; $content = fopen("$dir/share/half/$countline.txt", "w") or die ("Unknown Error"); fwrite($content, "$msg"); if($likeline == "") $likeline = "0"; $msgII = '
'.$user.'
'.smile_code($cap).'
'.$DT.'
( '.$likeline.' )

'; $content = fopen("$dir/share/full/$countline.txt", "w") or die ("Unknown Error"); fwrite($content, "$msgII"); $CPicDir = "$ipdir/$ipaddress/Pic.txt"; $CPicfile = fopen($CPicDir,"r"); rewind($CPicfile); $CPicline = fgets($CPicfile); $CPicNew = $CPicline + 1; $Pic = fopen("$CPicDir", "w") or die ("Unknown Error"); fwrite($Pic, "$CPicNew"); //header('Location: '.$rdr.'c'.$countline.''); echo ''; echo "
Success: your photo posted !
click here to continue
"; } else { $result= "oops, an unknown error occured, please try again later !"; } } else { move_uploaded_file($_FILES['uploaded_file']['tmp_name'],$newname); $result= "000"; $date = fopen("$picDir/$countline/Date.txt", "w") or die ("Unknown Error"); fwrite($date, "$DT"); $name = fopen("$picDir/$countline/Name.txt", "w") or die ("Unknown Error"); fwrite($name, "$user"); $caption = fopen("$picDir/$countline2/Caption.txt", "w") or die ("Unknown Error"); fwrite($caption, "$cap"); $smallCap = substr($cap, 0, 50); $smallCaption = fopen("$picDir/$countline/Smallcaption.txt", "w") or die ("Unknown Error"); fwrite($smallCaption, "$smallCap"); $unlike = fopen("$picDir/$countline/Unlike.txt", "w") or die ("Unknown Error"); fwrite($unlike, ""); if($smallCap == $cap) { $seeMore = ''; $smallCap = $smallCap; } else { $seeMore = '..... continue reading'; $smallCap = trim ( strtr ( $smallCap, array ( '[b]' => "", '[/b]' => "", '[i]' => "", '[/i]' => "", '[u]' => "", '[/u]' => "", '[small]' => "", '[/small]' => "", '[big]' => "", '[/big]' => "", '[s]' => "", '[/s]' => "", '[quote]' => '', '[/quote]' => "", '[url="' => '', '"]' => '', "[url='" => "", "']" => "", '[/url]' => "", '[color="' => '', '"]' => '">', "[color='" => "", "']" => "'>", '[/color]' => "", '[br]' => "", '[copy]' => "", '[/copy]' => "", '://' => "" ))); } $Comments = fopen("$picDir/$countline/Comments.txt", "w") or die ("Unknown Error"); fwrite($Comments, ""); $likedir = "$picDir/$countline/Like.txt"; $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); $msg = '
'.$user.'
'.smile_code($smallCap).$seeMore.'
'.$DT.' '.$likeline.'

'; $content = fopen("$dir/share/half/$countline.txt", "w") or die ("Unknown Error"); fwrite($content, "$msg"); $msgII = '
'.$user.'
'.smile_code($cap).'
'.$DT.'
( '.$likeline.' )

'; $content = fopen("$dir/share/full/$countline.txt", "w") or die ("Unknown Error"); fwrite($content, "$msgII"); //header('Location: '.$rdr.'c'.$countline.''); $CPicDir = "$ipdir/$ipaddress/Pic.txt"; $CPicfile = fopen($CPicDir,"r"); rewind($CPicfile); $CPicline = fgets($CPicfile); $CPicNew = $CPicline + 1; $Pic = fopen("$CPicDir", "w") or die ("Unknown Error"); fwrite($Pic, "$CPicNew"); echo ''; echo "
Success: your photo posted !
click here to continue
"; } } else { die("
Error Occured: only .JPG, .PNG & .GIF images are accepted !
click here to continue
"); } } else { die("
Error Occured: no pic selected !
click here to continue
"); } } if($view == 'post') { $ptextDir = "$dir/share/post"; if (!is_dir("$ptextDir/share")) mkdir("$ptextDir/share"); if (!is_dir("$ptextDir/posts")) mkdir("$ptextDir/posts"); if (isset($_POST['commentPost'])) { $commentPost = $_POST['commentPost']; } $c = $_GET['c']; if (!is_dir("$ptextDir/share/$c")) mkdir("$ptextDir/share/$c"); $countdirII = "$dir/share/post/count.txt"; if (file_exists ( "$countdirII")) { $countfileII = fopen($countdirII,"r"); rewind($countfileII); $countlineII = fgets($countfileII); } if (!is_dir("$ptextDir/share/$c/$countlineII")) mkdir("$ptextDir/share/$c/$countlineII"); if (is_dir("$dir/texts/$c")) { $commentsdir = "$dir/texts/$c/Comments.txt"; if (file_exists ( "$commentsdir" )) { $commentsfile = fopen($commentsdir,"r"); rewind($commentsfile); $commentsline = fgets($commentsfile); $commentsShares = $commentsline + 1; $comments = fopen("$commentsdir", "w") or die ("Unknown Error"); fwrite($comments, "$commentsShares"); $commentsfile = fopen($commentsdir,"r"); rewind($commentsfile); $commentsline = fgets($commentsfile); $textDir = "$dir/texts"; $smallCom = fopen("$textDir/$c/Smallcomment.txt", "r"); rewind($smallCom); $comline = fgets($smallCom); $fullCom = fopen("$textDir/$c/Comment.txt", "r"); rewind($fullCom); $fcomline = fgets($fullCom); $userfile = fopen("$textDir/$c/Name.txt","r"); rewind($userfile); $userline = fgets($userfile); $likedir = "$textDir/$c/Like.txt"; $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); if($comline == $fcomline) { $seeMore = ''; $comline = $comline; } else { $seeMore = '..... continue reading'; $comline = trim ( strtr ( $comline, array ( '[b]' => "", '[/b]' => "", '[i]' => "", '[/i]' => "", '[u]' => "", '[/u]' => "", '[small]' => "", '[/small]' => "", '[big]' => "", '[/big]' => "", '[s]' => "", '[/s]' => "", '[quote]' => '', '[/quote]' => "", '[url="' => '', '"]' => '', "[url='" => "", "']" => "", '[/url]' => "", '[color="' => '', '"]' => '">', "[color='" => "", "']" => "'>", '[/color]' => "", '[br]' => "", '[copy]' => "", '[/copy]' => "", '://' => "" ))); } if (isset($_GET['likeII'])) { $share = ''; $lllike = ' '; $cccomment = ''; } else { $share = ' '; $lllike = ' '; $cccomment = ''; } $msgII = '
'.$userline.'
'.smile_code($comline).$seeMore.'
'.$DT.' '.$likeline.''.$lllike.''.$cccomment.''.$share.'

'; $content = fopen("$dir/share/half/$c.txt", "w") or die ("Unknown Error"); fwrite($content, "$msgII"); } } if (is_dir("$dir/pics/$c")) { $commentsdir = "$dir/pics/$c/Comments.txt"; if (file_exists ( "$commentsdir" )) { $commentsfile = fopen($commentsdir,"r"); rewind($commentsfile); $commentsline = fgets($commentsfile); $commentsShares = $commentsline + 1; $comments = fopen("$commentsdir", "w") or die ("Unknown Error"); fwrite($comments, "$commentsShares"); $commentsfile = fopen($commentsdir,"r"); rewind($commentsfile); $commentsline = fgets($commentsfile); $picDir = "$dir/pics"; $smallCap = fopen("$picDir/$c/Smallcaption.txt", "r"); rewind($smallCap); $capline = fgets($smallCap); $fullCap = fopen("$picDir/$c/Caption.txt", "r"); rewind($fullCap); $fcapline = fgets($fullCap); $userfile = fopen("$picDir/$c/Name.txt","r"); rewind($userfile); $userline = fgets($userfile); $likedir = "$picDir/$c/Like.txt"; $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); if($capline == $fcapline) { $seeMore = ''; $capline = $capline; } else { $seeMore = '..... continue reading'; $capline = trim ( strtr ( $capline, array ( '[b]' => "", '[/b]' => "", '[i]' => "", '[/i]' => "", '[u]' => "", '[/u]' => "", '[small]' => "", '[/small]' => "", '[big]' => "", '[/big]' => "", '[s]' => "", '[/s]' => "", '[quote]' => '', '[/quote]' => "", '[url="' => '', '"]' => '', "[url='" => "", "']" => "", '[/url]' => "", '[color="' => '', '"]' => '">', "[color='" => "", "']" => "'>", '[/color]' => "", '[br]' => "", '[copy]' => "", '[/copy]' => "", '://' => "" ))); } $msgII = '
'.$userline.'
'.smile_code($capline).$seeMore.'
'.$DT.' '.$likeline.'

'; $content = fopen("$dir/share/half/$c.txt", "w") or die ("Unknown Error"); fwrite($content, "$msgII"); } } $likedir = "$ptextDir/$c/Like.txt"; if (file_exists ( "$likedir")) { $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); } $result= "111"; $date = fopen("$ptextDir/share/$c/$countlineII/Date.txt", "w") or die ("Unknown Error"); fwrite($date, "$DT"); $name = fopen("$ptextDir/share/$c/$countlineII/Name.txt", "w") or die ("Unknown Error"); fwrite($name, "$user"); $comment = fopen("$ptextDir/share/$c/$countlineII/Comment.txt", "w") or die ("Unknown Error"); fwrite($comment, "$commentPost"); $like = fopen("$ptextDir/share/$c/$countlineII/Like.txt", "w") or die ("Unknown Error"); fwrite($like, ""); $unlike = fopen("$ptextDir/share/$c/$countlineII/Unlike.txt", "w") or die ("Unknown Error"); fwrite($unlike, ""); $likedir = "$ptextDir/share/$c/$countlineII/Like.txt"; $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); $msg = '
'.$user.'
'.smile_code($commentPost).'
'.$DT.' '.$likeline.'

'; if (!is_dir("$ptextDir/posts/$c")) mkdir("$ptextDir/posts/$c"); $content = fopen("$ptextDir/posts/$c/$countlineII.txt", "w") or die ("Unknown Error"); fwrite($content, "$msg"); $CTextDir = "$ipdir/$ipaddress/Comment.txt"; $CTextfile = fopen($CTextDir,"r"); rewind($CTextfile); $CTextline = fgets($CTextfile); $CTextNew = $CTextline + 1; $Text = fopen("$CTextDir", "w") or die ("Unknown Error"); fwrite($Text, "$CTextNew"); //header('Location: '.$rdr.''); echo ''; echo "
Success: your comment posted !
click here to continue
"; } if($result == "000") { $maindir = "$dir/comments.txt"; if ( file_exists ( "$maindir" ) ) { $entries = file ( "$maindir" ); foreach ( $entries as &$e ) { $e = trim ( $e ); } } else { $entries = array (); } $include = "$sDir/half/$countline.txt"; array_unshift ( $entries, $include.' ' ); $entries = array_slice ( $entries, 0, 20 ); file_put_contents ( "$maindir", implode ( "\n", $entries ) ); } if(isset($_GET['like'])) { if(isset($_GET['c'])) $c = $_GET['c']; if($_GET['like'] == 'shareLike') { if (is_dir("$dir/texts/$c")) { $commentsdir = "$dir/texts/$c/Comments.txt"; if (file_exists ( "$commentsdir" )) { $commentsfile = fopen($commentsdir,"r"); rewind($commentsfile); $commentsline = fgets($commentsfile); if(isset($_POST['submitPost'])) { $commentsShares = $commentsline + 1; $comments = fopen("$commentsdir", "w") or die ("Unknown Error"); fwrite($comments, "$commentsShares"); $commentsfile = fopen($commentsdir,"r"); rewind($commentsfile); $commentsline = fgets($commentsfile); } } } $textDir = "$dir/texts"; $likedir = "$textDir/$c/Like.txt"; $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); $likeShares = $likeline + 1; $like = fopen("$likedir", "w") or die ("Unknown Error"); fwrite($like, "$likeShares"); $smallCom = fopen("$textDir/$c/Smallcomment.txt", "r"); rewind($smallCom); $comline = fgets($smallCom); $fullCom = fopen("$textDir/$c/Comment.txt", "r"); rewind($fullCom); $fcomline = fgets($fullCom); $userfile = fopen("$textDir/$c/Name.txt","r"); rewind($userfile); $userline = fgets($userfile); if($comline == $fcomline) { $seeMore = ''; $comline = $comline; } else { $seeMore = '..... continue reading'; $comline = trim ( strtr ( $comline, array ( '[b]' => "", '[/b]' => "", '[i]' => "", '[/i]' => "", '[u]' => "", '[/u]' => "", '[small]' => "", '[/small]' => "", '[big]' => "", '[/big]' => "", '[s]' => "", '[/s]' => "", '[quote]' => '', '[/quote]' => "", '[url="' => '', '"]' => '', "[url='" => "", "']" => "", '[/url]' => "", '[color="' => '', '"]' => '">', "[color='" => "", "']" => "'>", '[/color]' => "", '[br]' => "", '[copy]' => "", '[/copy]' => "", '://' => "" ))); } $likedir = "$textDir/$c/Like.txt"; $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); if (isset($_GET['likeII'])) { $share = ''; $lllike = ' '; $cccomment = ''; } else { $share = ' '; $lllike = ' '; $cccomment = ''; } $msg = '
'.$userline.'
'.smile_code($comline).$seeMore.'
'.$DT.' '.$likeline.''.$lllike.''.$cccomment.''.$share.'

'; $content = fopen("$dir/share/half/$c.txt", "w") or die ("Unknown Error"); fwrite($content, "$msg"); $msgII = '
'.$userline.'
'.smile_code($fcomline).'
'.$DT.'
( '.$likeline.' )'.$lllike.'

'; $contentII = fopen("$dir/share/full/$c.txt", "w") or die ("Unknown Error"); fwrite($contentII, "$msgII"); $CTextDir = "$ipdir/$ipaddress/Like.txt"; $CTextfile = fopen($CTextDir,"r"); rewind($CTextfile); $CTextline = fgets($CTextfile); $CTextNew = $CTextline + 1; $Text = fopen("$CTextDir", "w") or die ("Unknown Error"); fwrite($Text, "$CTextNew"); $unlikefile = fopen("./sites/$URL/texts/$c/Unlike.txt","r"); rewind($unlikefile); $unlikeline = fgets($unlikefile); $unlike = fopen("./sites/$URL/texts/$c/Unlike.txt", "w") or die ("Unknown Error"); fwrite($unlike, "$user $unlikeline"); //header('Location: '.$rdr.''); echo ''; echo "
Success: you liked a status !
click here to continue
"; } elseif($_GET['like'] == 'shareMoreLike') { if (is_dir("$dir/pics/$c")) { $commentsdir = "$dir/pics/$c/Comments.txt"; if (file_exists ( "$commentsdir" )) { $commentsfile = fopen($commentsdir,"r"); rewind($commentsfile); $commentsline = fgets($commentsfile); if(isset($_POST['submitPost'])) { $commentsShares = $commentsline + 1; $comments = fopen("$commentsdir", "w") or die ("Unknown Error"); fwrite($comments, "$commentsShares"); $commentsfile = fopen($commentsdir,"r"); rewind($commentsfile); $commentsline = fgets($commentsfile); } } } $picDir = "$dir/pics"; $likedir = "$picDir/$c/Like.txt"; $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); $likeShares = $likeline + 1; $like = fopen("$likedir", "w") or die ("Unknown Error"); fwrite($like, "$likeShares"); $smallCap = fopen("$picDir/$c/Smallcaption.txt", "r"); rewind($smallCap); $capline = fgets($smallCap); $fullCap = fopen("$picDir/$c/Caption.txt", "r"); rewind($fullCap); $fcapline = fgets($fullCap); $userfile = fopen("$picDir/$c/Name.txt","r"); rewind($userfile); $userline = fgets($userfile); if($capline == $fcapline) { $seeMore = ''; $capline = $capline; } else { $seeMore = '..... continue reading'; $capline = trim ( strtr ( $capline, array ( '[b]' => "", '[/b]' => "", '[i]' => "", '[/i]' => "", '[u]' => "", '[/u]' => "", '[small]' => "", '[/small]' => "", '[big]' => "", '[/big]' => "", '[s]' => "", '[/s]' => "", '[quote]' => '', '[/quote]' => "", '[url="' => '', '"]' => '', "[url='" => "", "']" => "", '[/url]' => "", '[color="' => '', '"]' => '">', "[color='" => "", "']" => "'>", '[/color]' => "", '[br]' => "", '[copy]' => "", '[/copy]' => "", '://' => "" ))); } $likedir = "$picDir/$c/Like.txt"; $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); $msg = '
'.$userline.'
'.smile_code($capline).$seeMore.'
'.$DT.' '.$likeline.'

'; $content = fopen("$dir/share/half/$c.txt", "w") or die ("Unknown Error"); fwrite($content, "$msg"); $msgII = '
'.$userline.'
'.smile_code($fcapline).'
'.$DT.'
( '.$likeline.' )

'; $content = fopen("$dir/share/full/$c.txt", "w") or die ("Unknown Error"); fwrite($content, "$msgII"); $CTextDir = "$ipdir/$ipaddress/Like.txt"; $CTextfile = fopen($CTextDir,"r"); rewind($CTextfile); $CTextline = fgets($CTextfile); $CTextNew = $CTextline + 1; $Text = fopen("$CTextDir", "w") or die ("Unknown Error"); fwrite($Text, "$CTextNew"); $unlikefile = fopen("./sites/$URL/pics/$c/Unlike.txt","r"); rewind($unlikefile); $unlikeline = fgets($unlikefile); $unlike = fopen("./sites/$URL/pics/$c/Unlike.txt", "w") or die ("Unknown Error"); fwrite($unlike, "$user $unlikeline"); //header('Location: '.$rdr.''); echo ''; echo "
Success: you liked a photo !
click here to continue
"; } } if($result == "111") { //$maindir = "$dir/share/post/comments.txt"; $maindir = "$dir/share/post/posts/$c/comments.txt"; if ( file_exists ( "$maindir" ) ) { $entries = file ( "$maindir" ); foreach ( $entries as &$e ) { $e = trim ( $e ); } } else { $entries = array (); } $include = "$dir/share/post/posts/$c/$countlineII.txt"; array_unshift ( $entries, $include.' ' ); $entries = array_slice ( $entries, 0, 20 ); file_put_contents ( "$maindir", implode ( "\n", $entries ) ); } if(isset($_GET['Plike'])) { if($_GET['Plike'] == 'post') { if(isset($_GET['c'])) $c = $_GET['c']; if(isset($_GET['cc'])) $cc = $_GET['cc']; $ppdir = "$dir/share/post/share"; $likedir = "$ppdir/$c/$cc/Like.txt"; $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); $likeShares = $likeline + 1; $like = fopen("$likedir", "w") or die ("Unknown Error"); fwrite($like, "$likeShares"); $fullCom = fopen("$ppdir/$c/$cc/Comment.txt", "r"); rewind($fullCom); $fcomline = fgets($fullCom); $likedir = "$ppdir/$c/$cc/Like.txt"; $likefile = fopen($likedir,"r"); rewind($likefile); $likeline = fgets($likefile); $msg = '
'.$user.'
'.smile_code($fcomline).'
'.$DT.' '.$likeline.'

'; $content = fopen("$dir/share/post/posts/$c/$cc.txt", "w") or die ("Unknown Error"); fwrite($content, "$msg"); $CTextDir = "$ipdir/$ipaddress/Like.txt"; $CTextfile = fopen($CTextDir,"r"); rewind($CTextfile); $CTextline = fgets($CTextfile); $CTextNew = $CTextline + 1; $Text = fopen("$CTextDir", "w") or die ("Unknown Error"); fwrite($Text, "$CTextNew"); $unlikefile = fopen("$ppdir/$c/$cc/Unlike.txt","r"); rewind($unlikefile); $unlikeline = fgets($unlikefile); $unlike = fopen("$ppdir/$c/$cc/Unlike.txt", "w") or die ("Unknown Error"); fwrite($unlike, "$user $unlikeline"); //header('Location: '.$rdr.''); echo ''; echo "
Success: you liked a comment !
click here to continue
"; }} ?>
.