$strSQL7 = "SELECT * FROM users WHERE userid = '{$sharer}' "; $rs = mysql_query($strSQL7) or die(mysql_error()); $row = mysql_fetch_array($rs); $arrayexisting = explode(";", $row['notifications']); if (!in_array(stripslashes($newnotification), $arrayexisting)) { $strSQL4 = "UPDATE users SET notifications=CONCAT(notifications,'{$newnotification};') WHERE userid = '{$sharer}' "; mysql_query($strSQL4) or die(mysql_error()); } } } //---include navbar---// $slashurl = addslashes($url); $strSQL4 = "SELECT * FROM branches WHERE url = '{$slashurl}' AND sharers LIKE '%{$myid}%' ORDER BY updated"; $rs = mysql_query($strSQL4) or die(mysql_error()); $row = mysql_fetch_array($rs); $siteid = $row["siteid"]; $checkedbutton = "\n\t\t\t<!-- checked button -->\n\t\t\t\t\t<div id='checkedbutton' tabindex='0' class='btn btn-success navbarbutton' onclick='checked()' onkeyup='if (event.keyCode == 32) document.getElementById('checkedbutton').click()' style='width: 15%' title='shared!'>\n\t\t\t\t\t\t<span class='glyphicon glyphicon-ok divbuttonglyph' aria-hidden='false'>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t<!-- share button -->\n\t\t\t\t\t<div name='sharebutton' tabindex='0' id='s_" . $siteid . "' class='btn btn-primary navbarbutton hide sharebutton' onclick='share(this.id)' onkeyup='if (event.keyCode == 32) document.getElementById('s_" . $siteid . "').click()' style='width: 15%' title='share with your friends'>\n\t\t\t\t\t\t<img src='sharewhite.png' style='height: 100%; width: auto'><p class='navbartext'>hare</p></img>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div name='sharechainbutton' tabindex='0' id='sharechainbuttondown' class='btn btn-primary navbarbutton' style='width: 10%' onclick='sharechainbutton()' onkeyup='if (event.keyCode == 32) document.getElementById('sharechainbuttondown').click()' title='see the share chain'>\n\t\t\t\t\t\t<span class='glyphicon glyphicon-chevron-down divbuttonglyph' aria-hidden='false'>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div name='sharechainbutton' tabindex='0' id='sharechainbuttonup' class='btn btn-primary navbarbutton hide' style='width: 10%' onclick='sharechainbutton()' onkeyup='if (event.keyCode == 32) document.getElementById('sharechainbuttonup').click()' title='hide the share chain'>\n\t\t\t\t\t\t<span class='glyphicon glyphicon-chevron-up divbuttonglyph' aria-hidden='false'>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t"; include "getsharechain.php"; $sharechainpane = getsharechain($siteid, $myid); //---tips---// if (isset($_SESSION["jumblies"]) and isset($_SESSION["tip"])) { include "tips.php"; $_SESSION["tip"] = updatetips("share", $_SESSION["tip"], $myid); $helppane = displaytip("project", $myid); } else { $helppane = ""; } echo $checkedbutton . ":|:|:|:" . $sharechainpane . ":|:|:|:" . $helppane; } else { header("Location: index.php"); }
} } //---update navbar---// include "getcomments.php"; $arraygetcomments = getcomments($p, $pagetype, $myid); $commentcount = $arraygetcomments[0]; $pagecomments = $arraygetcomments[1]; //---tips---// if (isset($_SESSION["jumblies"]) and isset($_SESSION["tip"])) { include "tips.php"; $_SESSION["tip"] = updatetips("comment", $_SESSION["tip"], $myid); $helppane = displaytip($pagetype, $myid); } else { $helppane = ""; } echo $commentcount . ":|:|:|:" . $helppane . ":|:|:|:" . $pagecomments; } elseif (!empty($_POST["p"]) and $myid > 0) { include "getcomments.php"; $arraygetcomments = getcomments(ltrim($_POST["p"], "c_"), $pagetype, $myid); $commentcount = $arraygetcomments[0]; $pagecomments = $arraygetcomments[1]; //---tips---// if (isset($_SESSION["jumblies"]) and isset($_SESSION["tip"])) { include "tips.php"; $_SESSION["tip"] = updatetips("comment", $_SESSION["tip"], $myid); $helppane = displaytip($pagetype, $myid); } else { $helppane = ""; } echo $commentcount . ":|:|:|:" . $helppane . ":|:|:|:" . $pagecomments; }
//- unset($_SESSION["tipbutton"]); $_SESSION["tip"] = updatetips("editsite", $_SESSION["tip"], $myid); } //---page-type---// if ($pagetype == "special") { if ($p == "welcome") { $tippage = "welcome"; } else { $tippage = "other"; } } else { $tippage = $pagetype; } //---embedcode---// $helppane = "\n\t\t\t<!-- helppane -->\n\t\t\t\t<div id='helppane' class='helptext' style='height: auto; width: 100%; background-color: rgba(255,255,255,1);'>\n\t\t\t\t\t" . displaytip($tippage, $myid) . "\n\t\t\t\t</div>\n\t\t\t"; //---complete---// if (strpos($_SESSION["tip"], "complete") !== FALSE) { $_SESSION["tip"] = updatetips("complete", $_SESSION["tip"], $myid); if ($_SESSION["tip"] == "unset") { unset($_SESSION["tip"]); } } elseif (strpos($_SESSION["tip"], "extension") !== FALSE) { $strSQL2 = "UPDATE users SET tips = ('beginner,advanced,professional,extension,') WHERE userid = '{$myid}' "; mysql_query($strSQL2) or die(mysql_error()); unset($_SESSION["tip"]); } elseif (strpos($_SESSION["tip"], "extension") !== FALSE) { unset($_SESSION["tip"]); } } else { $helppane = "<!-- helppane --><div id='helppane' class='helptext' style='height: auto; width: 100%; background-color: rgba(255,255,255,1);'></div>";
$strSQL7 = "UPDATE branches SET observerqueue=CONCAT(observerqueue,'{$myid},') WHERE siteid = '{$siteid}' "; mysql_query($strSQL7) or die(mysql_error()); } //---wavescount---// $strSQL17 = "SELECT * FROM branches WHERE observerqueue LIKE '%{$myid}%' "; $rs = mysql_query($strSQL17) or die(mysql_error()); $wavescount = mysql_num_rows($rs); if ($wavescount == 0) { $wavescount = ""; } //---update navbar---// include "getcomments.php"; $arraygetcomments = getcomments($friendid, "profile", $myid); $commentcount = $arraygetcomments[0]; $pagecomments = $arraygetcomments[1]; $strSQL1 = "SELECT * FROM users WHERE friends LIKE '%{$friendid}%' "; $rs = mysql_query($strSQL1) or die(mysql_error()); $followercount = mysql_num_rows($rs); $unfollowbutton = "\n\t\t\t<!-- unfollow button -->\n\t\t\t\t<div name='unfollowbutton' tabindex='0' id='unfollow_" . $friendid . "' class='btn btn-success navbarbutton' onclick='unfollow(this.id)' onkeyup='if (event.keyCode == 32) document.getElementById('unfollow_" . $friendid . "').click()' title='unfollow this user'>\n\t\t\t\t\t<span class='glyphicon glyphicon-heart divbuttonglyph' style='padding-right: 3px' aria-hidden='false'></span>\n\t\t\t\t\t<span class='badge'>" . $followercount . "</span>\n\t\t\t\t</div>\n\t\t\t"; //---tips---// if (isset($_SESSION["jumblies"]) and isset($_SESSION["tip"])) { include "tips.php"; $_SESSION["tip"] = updatetips("follow", $_SESSION["tip"], $myid); $helppane = displaytip("profile", $myid); } else { $helppane = ""; } echo $unfollowbutton . ":|:|:|:" . $wavescount . ":|:|:|:" . $commentcount . ":|:|:|:" . $pagecomments . ":|:|:|:" . $helppane; } else { header("Location: index.php"); }