function search($term) { global $name, $path, $TweetsPulled, $TweetsAnalyzed, $tweets; $name = $term; $path = "Cache Files/cache" . $name . ".txt"; $id = getID($name); $pic = getProfilePic($id, $name); $max_id = getNextID($path); //gets next tweet to cache, creates file if new cache to be made $tweets = getTweets($name, $id, $TweetsPulled, $max_id); if (!isset($tweets) || count($tweets) < 1) { echo "<script> alert('Bad Twitter Handle'); </script>"; return; } $res = parseData($tweets, $TweetsAnalyzed); }
* Version: 2.4.7 * FILE: members.php * AUTHOR: Elizabeth Perreau and Dave Morton * DATE: 12-12-2014 * DETAILS: Administers member (admin) accounts ***************************************/ ini_set('memory_limit', '128M'); ini_set('max_execution_time', '0'); $post_vars = filter_input_array(INPUT_POST); $user_name = ''; $action = isset($post_vars['action']) ? ucfirst(strtolower($post_vars['action'])) : 'Add'; if (!empty($post_vars)) { $msg = save($action); } $id = (isset($post_vars['id']) and $action != 'Add') ? $post_vars['id'] : getNextID(); $id = $id <= 0 ? getNextID() : $id; if (isset($post_vars['memberSelect'])) { $id = $post_vars['memberSelect']; $data = getMemberData($post_vars['memberSelect']); $id = $data['id']; $user_name = $data['user_name']; } $upperScripts = $template->getSection('UpperScripts'); $XmlEntities = array('&' => '&', '<' => '<', '>' => '>', ''' => '\'', '"' => '"'); $AdminsOpts = getAdminsOpts(); $membersForm = $template->getSection('MembersForm'); $members_list_form = $template->getSection('MembersListForm'); $showHelp = $template->getSection('MembersShowHelp'); $topNav = $template->getSection('TopNav'); $leftNav = $template->getSection('LeftNav'); $main = $template->getSection('Main');
</select> </div> </div> <div class ="row"> <div class ="spacer"></div> <div class ="col-sm-1"> <input type="submit" id="_submit" class="btn btn-primary btn-sm" name="submit" value="Update"> </div> </div> </form> </html> <?php if (isset($_POST['submit'])) { $tid = getNextID($database, 'transaction', 'transactionid') + 2; $quantity = $_POST['quantityDrop']; $transDate = date("20y-m-d"); $inventoryNum = 0; // get inventory num from $resultItem foreach ($resultItem as $row => $value) { if ($itemValue == $value["name"]) { $inventoryNum = $value["inventorynum"]; } } $membId = 0; $total = $price * $quantity; //echo $memberValue." itemNum=" . $inventoryNum . " itemvalue = ".$itemValue." tid = ".$tid." total = ".$total; $namesArr = preg_split("/[\\s,]+/", $memberValue); $firstName = $namesArr[0]; $lastName = $namesArr[1];
function insertNewPlayer($name, $score, $game) { $Joueur = array("_id" => getNextID(), "pseudo" => $name, "jeux" => array(array("scores" => $score, "name" => $game, "badges" => array()))); returnConnection()->Maets->Joueurs->insert($Joueur); }
// --------------------------- // parameters 取得 // --------------------------- $grp_id = \Sop\Session::getSiteData('grp_id'); $role_aprv = \Sop\Session::getSiteData('role_aprv'); $role_upld = \Sop\Session::getSiteData('role_upld'); $role_user = \Sop\Session::getSiteData('role_user'); $user_id = \Sop\Session::getSiteData('user_id'); $pj_id = array_key_exists('pj_id', $_REQUEST) ? str_replace('pj_', '', $_REQUEST['pj_id']) : ''; $sop_id = array_key_exists('sop_id', $_REQUEST) ? str_replace('sop_', '', $_REQUEST['sop_id']) : ''; $schema_type = array_key_exists('schema_type', $_REQUEST) ? $_REQUEST['schema_type'] : ''; $tpl_name = array_key_exists('tpl_name', $_REQUEST) ? $_REQUEST['tpl_name'] : ''; $upld_cmnt = array_key_exists('upld_cmnt', $_REQUEST) ? $_REQUEST['upld_cmnt'] : ''; // --- ID取得 $tpl_id = getNextID($db, "tpl", "tpl_id"); $schema_id = getNextID($db, "`schema`", "schema_id"); // --- データ存在チェック (親データ) $sel_sql = getSQLBaseForSopList(); $sel_sql .= " AND sop.sop_id = :sop_id"; $sql = "SELECT count(*) cnt FROM ({$sel_sql}) as tmp"; $params = array(); $params[':sop_id'] = $sop_id; $stmt = $db->prepare($sql); $stmt->execute($params); $cnt = 0; foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) { $cnt = (int) $row['cnt']; } if ($cnt == 0) { \Sop\Log::warning(__FILE__, __LINE__, 'Specified template does not exist.'); $msg001 = "The data of the upload place already has been deleted.";
</form> <?php if ($id && $firstName && $lastName && $NIC_No && $license_No && $job_Type && $contact_No) { $sql = $conn->prepare("INSERT INTO employee(Employee_ID,Contact_No,NIC,License_No,Job_Type) VALUES(?,?,?,?,?) "); $sql1 = $conn->prepare("INSERT INTO employee_name(Employee_ID,First_Name,Last_Name) VALUES (?, ?, ?)"); $sql->bind_param("sssss", $id, $contact_No, $NIC_No, $license_No, $Job_Type); $sql1->bind_param("sss", $id, $firstName, $lastName); if ($sql->execute() == TRUE && $sql1->execute() == TRUE) { echo "New record created successfully."; } else { echo " Error" . $sql . "</br>" . $conn->error; } } getNextID(); ?> </div> <!-- /.col-lg-6 (nested) --> <!-- /.col-lg-6 (nested) --> </div> <!-- /.row (nested) --> </div> <!-- /.panel-body --> </div> <!-- /.panel --> </div> <!-- /.col-lg-12 --> </div>