/** * * * @param PostController $Sender * @param type $RecordType * @param type $ID * @throws type */ public function postController_googlePlus_create($Sender, $RecordType, $ID) { $Row = GetRecord($RecordType, $ID); if ($Row) { $Message = SliceParagraph(Gdn_Format::plainText($Row['Body'], $Row['Format']), 160); $Get = array('url' => $Row['ShareUrl']); $Url = 'https://plus.google.com/share?' . http_build_query($Get); redirect($Url); } $Sender->render('Blank', 'Utility', 'Dashboard'); }
/** * * * @param PostController $Sender * @param type $RecordType * @param type $ID * @throws type */ public function postController_twitter_create($Sender, $RecordType, $ID) { if (!$this->socialReactions()) { throw permissionException(); } // if (!Gdn::request()->isPostBack()) // throw permissionException('Javascript'); $Row = GetRecord($RecordType, $ID, true); if ($Row) { // Grab the tweet message. switch (strtolower($RecordType)) { case 'discussion': $Message = Gdn_Format::plainText($Row['Name'], 'Text'); break; case 'comment': default: $Message = Gdn_Format::plainText($Row['Body'], $Row['Format']); } $Elips = '...'; $Message = preg_replace('`\\s+`', ' ', $Message); // if (function_exists('normalizer_is_normalized')) { // // Slice the string to 119 characters (21 reservered for the url. // if (!normalizer_is_normalized($Message)) // $Message = Normalizer::normalize($Message, Normalizer::FORM_D); // $Elips = Normalizer::normalize($Elips, Normalizer::FORM_D); // } $Max = 140; $LinkLen = 22; $Max -= $LinkLen; $Message = SliceParagraph($Message, $Max); if (strlen($Message) > $Max) { $Message = substr($Message, 0, $Max - strlen($Elips)) . $Elips; } // echo $Message.strlen($Message); if ($this->accessToken()) { Gdn::controller()->setData('Message', $Message); $Message .= ' ' . $Row['ShareUrl']; $R = $this->api('/statuses/update.json', array('status' => $Message), 'POST'); $Sender->setJson('R', $R); $Sender->informMessage(t('Thanks for sharing!')); } else { $Get = array('text' => $Message, 'url' => $Row['ShareUrl']); $Url = "https://twitter.com/share?" . http_build_query($Get); redirect($Url); } } $Sender->render('Blank', 'Utility', 'Dashboard'); }
/** * * @param PostController $Sender * @param type $RecordType * @param type $ID * @throws type */ public function PostController_Facebook_Create($Sender, $RecordType, $ID) { if (!$this->SocialReactions()) { throw PermissionException(); } // if (!Gdn::Request()->IsPostBack()) // throw PermissionException('Javascript'); $Row = GetRecord($RecordType, $ID); if ($Row) { $Message = SliceParagraph(Gdn_Format::PlainText($Row['Body'], $Row['Format']), 160); if ($this->AccessToken() && $Sender->Request->IsPostBack()) { $R = $this->API('/me/feed', array('link' => $Row['ShareUrl'], 'message' => $Message)); $Sender->SetJson('R', $R); $Sender->InformMessage(T('Thanks for sharing!')); } else { // http://www.facebook.com/dialog/feed?app_id=231546166870342&redirect_uri=http%3A%2F%2Fvanillicon.com%2Fredirect%2Ffacebook%3Fhash%3Daad66afb13105676dffa79bfe2b8595f&link=http%3A%2F%2Fvanillicon.com&picture=http%3A%2F%2Fvanillicon.com%2Faad66afb13105676dffa79bfe2b8595f.png&name=Vanillicon&caption=What%27s+Your+Vanillicon+Look+Like%3F&description=Vanillicons+are+unique+avatars+generated+by+your+name+or+email+that+are+free+to+make+%26+use+around+the+web.+Create+yours+now%21 $Get = array('app_id' => C('Plugins.Facebook.ApplicationID'), 'link' => $Row['ShareUrl'], 'name' => Gdn_Format::PlainText($Row['Name'], 'Text'), 'description' => $Message, 'redirect_uri' => Url('/post/shared/facebook', TRUE)); $Url = 'http://www.facebook.com/dialog/feed?' . http_build_query($Get); Redirect($Url); } } $Sender->Render('Blank', 'Utility', 'Dashboard'); }
} function NavCell($strLabel) { global $strAppURL; echo "<tr>"; echo "\t<td valign=top><img src=" . $strAppURL . "/images/arrow.png></td>"; echo "\t<td width=100% valign=top>{$strLabel}</td>"; echo "</tr>"; } // connect to database MySQLConnect(); //echo $_SERVER["SCRIPT_NAME"]."==========".$strLoginScriptPath; die; if ($_SERVER["SCRIPT_NAME"] != $strLoginScriptPath && PHP_SAPI != "cli") { // echo $_SERVER["SCRIPT_NAME"]."==========".$strLoginScriptPath; die; $strWhere = "user_login = '******' and user_password = '******' and user_type = 1"; $rstRow = GetRecord("tbluser", $strWhere); // if we have not found this user if (empty($rstRow["user_id"])) { header("Location: index?error=1"); exit; } else { $_SESSION["nUserId"] = $rstRow["user_id"]; $_SESSION["strUserName"] = $rstRow["user_name"]; $_SESSION["strUserAdmin"] = $rstRow["user_admin"]; $_SESSION["nEnableDisable"] = $rstRow["user_disabled"]; } } else { echo "out"; die; } // Get air line names
<?php require_once 'header.php'; if (!empty($_GET['id'])) { $ID = $_GET['id']; $Where = "user_id = '" . (int) $ID . "'"; $strRow = GetRecord("our_family", $Where); $user_id = $strRow['user_id']; $urdu_text = $strRow['urdu_text']; if (!empty($strRow['user_image'])) { $user_image1 = $strRow['user_image']; } else { if ($strRow['user_type'] == 1) { $user_image1 = 'male.jpg'; } else { $user_image1 = 'female.png'; } } } ?> <section> <div class="container"> <div class="row"> <?php require_once 'left_side_bar.php'; ?> <div class="col-sm-9 padding-right"> <div class="product-details"><!--product-details--> <div class="col-sm-5"> <div class="view-product"> <img src="admin/images/<?php
<?php include_once 'top.php'; $strRow = ""; if (!empty($_GET['id'])) { $ID = $_GET['id']; $Where = "air_line_id = '" . $ID . "'"; $strRow = GetRecord("tblairlines", $Where); $Name = $strRow['air_line_name']; $Code = $strRow['air_line_code']; $Image = $strRow['air_line_image']; } ?> <body> <div id="wrapper"> <!-- Navigation --> <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0"> <?php include_once 'header.php'; ?> <?php include_once 'leftsidebar.php'; ?> </nav>
<?php include_once "conn.php"; include_once "function.php"; if ($_GET["action"] == "") { exit; } if ($_GET["action"] == "register") { echo Register($_GET["phonenum"], $_GET["password"]); } if ($_GET["action"] == "login") { echo Login($_GET["phonenum"], $_GET["password"]); } if ($_GET["action"] == "add_guardian") { echo AddGuardian($_GET["phonenum"], $_GET["guardiantel"]); } if ($_GET["action"] == "del_guardian") { echo DelGuardian($_GET["phonenum"], $_GET["guardiantel"]); } if ($_GET["action"] == "get_guardian") { echo GetGuardian($_GET["phonenum"]); } if ($_GET["action"] == "add_record") { echo AddRecord($_GET["phonenum"], $_GET["value"], $_GET["food"], $_GET["sport"], $_GET["medicine"], $_GET["round"]); } if ($_GET["action"] == "get_record") { echo GetRecord($_GET["phonenum"], $_GET["starttime"], $_GET["endtime"]); }
$arr = array('user_name' => $_POST['user_name'], 'user_order' => $_POST['user_order'], 'user_type' => $_POST['user_type'], 'dob' => $_POST['dob'], 'death_date' => $_POST['death_date'], 'mother_id' => $_POST['mother_id'], 'father_id' => $_POST['father_id'], 'spous_id' => $_POST['spous_id'], 'urdu_text' => $_POST['urdu_text'], 'user_image' => $ImageName, 'date_created' => date("Y-m-d H:i:s")); if (empty($_POST['nUserID'])) { $nLastID = InsertRec("our_family", $arr); } else { $nLastID = UpdateRec('our_family', "user_id = '" . $_POST['nUserID'] . "'", $arr); $nLastID = $_POST['nUserID']; } header("Location: view_users"); //} break; // Banner Management // Banner Management case "AddBanner": // Upload Image $Where = " banner_id = '" . (int) $_POST['nBannerID'] . "'"; $GetRow = GetRecord("tblbanner", $Where); if (empty($_FILES["fileToUpload"]["name"])) { $_POST['fileToUpload'] = $GetRow['banner_image']; } else { $_POST['fileToUpload'] = $_POST['fileToUpload']; } $random_no = generateRandomString(5); $target_dir = "images/"; $target_file = $target_dir . basename($random_no . $_FILES["fileToUpload"]["name"]); $uploadOk = 1; $imageFileType = pathinfo($target_file, PATHINFO_EXTENSION); // Check if image file is a actual image or fake image if (isset($_POST["submit"])) { $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]); if ($check !== false) { echo "File is an image - " . $check["mime"] . ".";
* @time : 16:32 * @subpackage index.php * @issue : index page link to all CM with bootstrap */ // is user in manager page define('__MP__', FALSE); session_start(); ob_start(); require_once './tconstant.php'; require_once './inc/header.php'; define('PAGE_C', 24); require './api/general.php'; require './api/relation.php'; require './tempp/topic.php'; $a = GetTag(); $a = GetRecord($ID); $dt = new TDate(); $st = new TStatistic(); $st->Count(); $viss['visitcount'] = $st->VisitCount($dt->Today(), time()); $viss['visitorcount'] = $st->VisitorCount($dt->Today(), time()); $viss['y'] = $st->VisitCount($dt->Yesterday(), $dt->Today()); $viss['totoal'] = $st->VisitCount(0, time()); $viss['online'] = $st->OnlineCount(); //print_r($viss);die; $smarty->assign('vss', $viss); if (isset($_COOKIE['mid'])) { $_SESSION['mid'] = $_COOKIE['mid']; } if (isset($url[1]) && $url[0] == 'form' && isset($_POST)) { require './inc/form.php';