/** * Setfile path and destinationpath */ public function __construct($fpath = "", $fdest = "") { parent::__construct(); $this->connect(); /*$this->filePath = empty($fpath)?getcwd():$fpath; $this->fileDestination = empty($fdest)?getcwd():$fdest; if(empty($this->fileName)){$this->getFileName($this->filePath);}*/ }
public function __construct() { /*** Set current user for the operation * @Data $user */ parent::__construct(); $this->connect(); // $this->currentUser = $user; }
/** * Constructor that takes user id; * @obj (userID) */ public function __construct($obj = "") { parent::__construct(); $this->connect(); $this->UID = !empty($obj) ? $obj : CURID; $this->getUser(); // call getuser $this->getAddress(); // call getaddress }
<?php if (!session_start()) { session_start(); } header('Access-Control-Allow-Origin: *'); include_once "./libs/aClass/sysDB.php"; include_once "./libs/aClass/profileSettings.php"; $topHand = new sysDB(); $topHand->connect(); $getUser = trim($_GET['user']); $confUser; $USERCHECK; if (empty($getUser) || !isset($_GET['user'])) { if (!$_SERVER['SCRIPT_NAME'] == "/index.php") { header('Location:http:/'); } } else { $topHand->setRquery(" SELECT * FROM amistiUser WHERE uName=?", array($getUser)); $USERCHECK = $topHand->getRquery(); if (count($USERCHECK[0]['uName']) > 0) { $confUser = $USERCHECK[0]['uName']; $_SESSION['curUser'] = $confUser; $_SESSION['curUserID'] = $USERCHECK[0]['userID']; } else { header('Location:http:/'); } } /* First if check to see if the url user is empty. if Its empty, do nothing.
<?php if (!session_start()) { session_start(); } require_once "../aClass/sysDB.php"; include "../aClass/profileSettings.php"; $handler = new sysDB(); $handler->connect(); if ($_GET['uName']) { // CHECK USER NAME $uName = $_GET['uName']; $handler->setRquery("SELECT uName from amistiUser WHERE uName=?", array($uName)); $res = $handler->getRquery(); if (count($res[0]['uName']) > 0) { echo 1; } else { echo 0; } } if ($_GET['email']) { //check email $email = $_GET['email']; if (filter_var($email, FILTER_VALIDATE_EMAIL)) { $handler->setRquery("SELECT email from amistiUser WHERE email=?", array($email)); $res = $handler->getRquery(); if (count($res[0]['email']) > 0) { echo 2; } else { echo 0; }
<?php if (!session_start()) { session_start(); } require_once "libs/aClass/sysDB.php"; require_once "libs/aFunctions/timeFunc.php"; $dbHandle = new sysDB(); $dbHandle->connect(); $RegEmail = base64_decode($_GET['conf']); $userName = $_GET['user']; $passWord = $_GET['token']; header('Location:https://amisti.com'); $dbHandle->setRquery("SELECT * FROM amistiUser WHERE uName=?\n\t AND password=? \n\t\t\t\t\t\t\t AND email=? ", array($userName, $passWord, $RegEmail)); $resultData = $dbHandle->getRquery(); if (!count($resultData) > 0) { header('Location:https://amisti.com'); exit; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Confirm Registration </title> <link rel="stylesheet" type="text/css" href="css/amisti.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/themes/smoothness/jquery-ui.css" /> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>
<?php if (!session_start()) { session_start(); } require_once "./libs/aClass/sysDB.php"; //include($_SERVER['DOCUMENT_ROOT']."/libs/aClass/profileSettings.php"); $topHand = new sysDB(); $topHand->connect(); ?> <div id="topBar" > <!-- topbar --> <div id="tbInner"> <!-- inner top bar --> <div id="amistiLogo" > <!-- amisti pic home --> <a href="/" ><img src="../libs/libImages/amisti.png" style="height:40px; width:40px;" alt="amisti logo"></a> </div> <div id="topSearch"> </div> <!-- TOP SEARCH --> <?php if (isset($_SESSION['logIn'])) { ?> <div id="topMenu"> <!-- Top Menu ----> <div id="topMenuMsg" > <img src="../libs/libImages/icons/basic_message.png"class="allIcons" alt="msg"></div> <!-- top message notification --> <div id="topMenuNtn" > <img src="../libs/libImages/icons/basic_world.png" class="allIcons" alt="bell"></div> <!-- General other notification -->
<?php if (!session_start()) { session_start(); } require_once "./libs/aClass/sysDB.php"; ?> <?php $dpHandle = new sysDB(); $dpHandle->connect(); $dpHandle->setRquery("SELECT * from amistiUser "); //get everything out from amisti user for now. $dbRes = $dpHandle->getRquery(); for ($x = 0; $x < count($dbRes); $x++) { if ($_SESSION['uName'] == $dbRes[$x]['uName']) { } else { ?> <a href="/<?php echo $dbRes[$x]['uName']; ?> "> <div style="width:176px; height:176px; display:block; float:left; margin:5px; background-color:brown;"> <?php echo $dbRes[$x]['fName']; ?> </div> </a> <?php } }
function getComments($imgID, $theID, $picOrPost) { $topHand = new sysDB(); $topHand->connect(); $topHand->setRquery("SELECT * FROM amistiUser WHERE uName=?", array($_SESSION['curUser'])); $USERCHECK = $topHand->getRquery(); // DECLARE VARIABLES $PPComText; $PPComID; $PPComTime; //CHECK IF THERE IS POST /PIC COMMEMTS FOR THE POST/PIC $topHand->setRquery("SELECT * from amistiComment INNER JOIN amistiUser ON amistiComment.userID = amistiUser.userID\n\t\t\t\t\t\t WHERE amistiComment.commentItemID=?", array($theID)); //set variables $PPComText = "commentText"; $PPComID = "commentID"; $PPComTime = "commentTime"; $commentRes = $topHand->getRquery(); //$commentRes = count($commentRes ); // comment count here // get comments from database ?> <!--- show comments --> <div class="ccShowComments"> <!-- COMMENTS PANE HERE --> <div class="ccshowCommentsBoxMain"> <?php // first check if the user is registered or login if (count($commentRes) > 0) { for ($n = 0; $n < count($commentRes); $n++) { //get user icon $topHand->setRquery("SELECT * FROM amistiUser WHERE userID=?", array($commentRes[$n]['userID'])); $uIconRes = $topHand->getRquery(); $topHand->setRquery("SELECT * FROM amistiProfilePic WHERE profilePicCurrent=? AND userID=?", array(1, $commentRes[$n]['userID'])); $userIco = $topHand->getRquery(); $uIcon = $userIco[0]['profileImgPath'] == "" || 0 ? "/libs/libImages/icons/Man.png" : getImgPath($userIco[0]['profileImgPath']); $topHand->setRquery("SELECT * FROM amistiComment WHERE userID=? AND commentItemID=? AND commentShow=?", array($commentRes[$n]['userID'], $theID, 1)); $comData = $topHand->getRquery(); // get query results for ($X = 0; $X < count($comData); $X++) { } ?> <div class="ccShowCommentInner" id="comm_<?php echo $commentRes[$n][$PPComID]; ?> "> <a href="/<?php echo $commentRes[$n]['uName']; ?> " > <div class="ccShowCommentUIcon showUserPopUpPic" style="background-image:url( '<?php echo $uIcon; ?> ')"> </div> </a> <div class="ccShowCommentTextAllCon" > <div class="ccShowCommentText"> <a href="/<?php echo $commentRes[$n]['uName']; ?> " class="showUserPopUpName"><?php echo $uIconRes[0]['fName'] . " " . $uIconRes[0]['sName']; ?> </a> <?php echo $commentRes[$n][$PPComText]; ?> </div> <?php if (isset($_SESSION['userID'])) { //only show menu to login users ?> <div class="ccShowCommentMenuDHR">...</div> <?php if ($_SESSION['curUserID'] == $_SESSION['curUserID']) { if ($_SESSION['userID'] == $commentRes[$n]['userID']) { ?> <div class ="ccCommentMenu"> <span class="ccCommentMenuArrowTop"></span> <div class="ccCommentMenuData" > <li class="comEdit"> Edit...</li> <li class="comDelete"> Delete...</li> </div> <span class="ccCommentMenuArrowBot"></span> </div> <?php } else { ?> <div class ="ccCommentMenu"> <span class="ccCommentMenuArrowTop"></span> <div class="ccCommentMenuData" > <li class="comDelete"> Remove...</li> <li class="comReport"> Report...</li> </div> <span class="ccCommentMenuArrowBot"></span> </div> <?php } } elseif ($commentRes[$n]['userID'] == $_SESSION['userID']) { ?> <div class ="ccCommentMenu"> <span class="ccCommentMenuArrowTop"></span> <div class="ccCommentMenuData" > <li class="comEdit"> Edit...</li> <li class="comDelete"> Delete...</li> </div> <span class="ccCommentMenuArrowBot"></span> </div> <?php } else { ?> <div class ="ccCommentMenu"> <span class="ccCommentMenuArrowTop"></span> <div class="ccCommentMenuData" > <li class="comReport"> Report...</li> </div> <span class="ccCommentMenuArrowBot"></span> </div> <?php } } ?> <div class="ccCommentTLLCBoxMain" > <div class=" ccCommentTime"><?php echo relativeTime($commentRes[$n][$PPComTime]); ?> </div> <div class ="ccCommentMidDot">·</div> <div class=" ccCommentApprove"> <?php // if($picOrPost == true){ $topHand->setRquery("SELECT * FROM amistiApprove WHERE approveItemID=?", array($commentRes[$n][$PPComID])); /* }else{ $topHand->setRquery("SELECT * FROM amistiPicApprove WHERE picID=?",array($commentRes [$n][$PPComID])); }*/ $conR = $topHand->getRquery(); $appCountN = count($conR) == 0 ? "" : count($conR); // get the approve count $foundYes; if (isset($_SESSION['logIn'])) { for ($cA = 0; $cA < count($conR); $cA++) { if ($conR[$cA]['userID'] == $_SESSION['userID']) { $foundYes = true; } } if ($foundYes) { echo ' <a href="#">Approve</a> ' . $appCountN; } else { echo ' <a href="#">approve</a> ' . $appCountN; } $foundYes = false; } else { echo ' <a href="#">approve</a> ' . $appCountN; } ?> <!-- <a href="#">approve</a>--> </div> </div> </div> </div> <?php } } ?> </div> </div> <?php if (!isset($_SESSION['logIn']) || !isset($_SESSION['userID'])) { echo "login to post comment..."; } else { ?> <!-- text area -----> <textarea placeholder="Post a comment..." class="commentPost autoExpand" ></textarea> <!-- text area inner images --> <div class="ccTxtAreaIcons"> <img src="/libs/libImages/smilies/angel.png" alt="chat icon"> </div> <!-- text area icon --> <?php $topHand->setRquery("SELECT * FROM amistiUser INNER JOIN amistiProfilePic ON amistiUser.userID = amistiProfilePic.userID\n\t\t\t WHERE amistiUser.userID=? AND amistiProfilePic.profilePicCurrent=?", array($_SESSION['userID'], 1)); $pIconRes = $topHand->getRquery(); $imgP = count($pIconRes) == 0 ? "/libs/libImages/icons/Man.png" : getImgPath($pIconRes[0]['profileImgPath']); ?> <div class="ccPostCommentIcon" style="background-image:url('<?php echo $imgP; ?> ')"> </div> <?php } }
<?php if (!session_start()) { session_start(); } include_once "./libs/aClass/sysDB.php"; $topHand = new sysDB(); $topHand->connect(); ?> <div id="photoPageCover"> <!--- PHOTO SHOW PAGE COVER MAIN ----------> </div> <!-- white board --> <div id="whiteB"></div> <div id="pageCover"> <!--- PAGE COVER MAIN ----------> <div id="pageCoverInner"> <div id="pageCoverClose" title="Close"> <img src="libs/libImages/icons/close.png" class="allIcons" alt="close" ></div> <h2> Amisti notification</h2> <hr> <div id="PCIDNotification"> <img src="libs/libImages/aNoti.png" width="50px" height="50px" alt="noti"></div> <div id="PCID"></div> </div> </div> <!--------PHOTO CROP PROFILE IMAGE PAGE COVER CONTAINER WORKS -------------------------------------------------------- --> <div id="photoPageCoverContainer"> <!---MAIN PHOTO PAGECOVER CONTAINER ----------> <!-- close button -->