<?php //find a match for ($i = 0; $i < count($file); $i++) { //these are all of the necessary variables to solve the comparisions //store string of the current persons info $tmp_person = $file[$i]; //convert the string into an array $tmp_person_array = explode(",", $tmp_person); //this is to determine the image used if the person is a match $userimg = ""; //opposite gender if (checkgender($gender, $tmp_person_array[1])) { //store type of image name $userimg = setuserimg($tmp_person_array[1]); //compatible ages if (checkage($minAge, $maxAge, $tmp_person_array[2])) { //same operating if (checkoperating($operating, $tmp_person_array[4])) { //share at least one letter in same position if (checkpersonality($personality, $tmp_person_array[3])) { //all are true so it is a match! //create a li item ?> <li class="match"> <p> <img src="<?php echo $userimg; ?> .png"><?php echo $tmp_person_array[0]; ?> </p>
titlebar($apx->lang->get('HEADLINE') . ': ' . $res['title']); videos_showcomments($_REQUEST['id']); } ///////////////////////////////////////////////////////////////////////////////////////// DETAILS if ($_REQUEST['id']) { $apx->lang->drop('detail'); //Verwendete Variablen auslesen $parse = $apx->tmpl->used_vars('detail'); //Video-Info $res = $db->first("SELECT a.*,b.username,b.email,b.pub_hidemail FROM " . PRE . "_videos AS a LEFT JOIN " . PRE . "_user AS b USING(userid) WHERE ( a.id='" . $_REQUEST['id'] . "' AND a.status='finished' " . iif(!$user->is_team_member(), "AND ( '" . time() . "' BETWEEN a.starttime AND a.endtime )") . " " . section_filter() . " ) LIMIT 1"); if (!$res['id']) { filenotfound(); } //Altersabfrage if ($res['restricted']) { checkage(); } //Counter $db->query("UPDATE " . PRE . "_videos SET hits=hits+1 WHERE ( " . time() . " BETWEEN starttime AND endtime AND id='" . $_REQUEST['id'] . "' " . section_filter() . " )"); //Headline titlebar($apx->lang->get('HEADLINE') . ': ' . $res['title']); //Kategorie-Info if (in_array('CATTITLE', $parse) || in_array('CATTEXT', $parse) || in_array('CATICON', $parse) || in_array('CATLINK', $parse) || in_array('CATCOUNT', $parse)) { //Tree-Manager require_once BASEDIR . 'lib/class.recursivetree.php'; $tree = new RecursiveTree(PRE . '_videos_cat', 'id'); $catinfo = $tree->getNode($res['catid'], array('*')); } //Videos in der Kategorien $catcount = 0; if (in_array('CATCOUNT', $parse)) {
function seperatetokens($tags) { $i = 0; $j = 0; $k = 0; $pp = 0; $wflag = 0; $aflag = 0; $nflag = 0; $oflag = 0; $l = count($tags); foreach ($tags as $t) { //echo $t['token']."/".$t['tag']." <br>"; $new = $t['tag']; $new = preg_replace('/\\s+/', '', $new); //echo "<br />"; if ($new == 'WEE') { $week[$i] = $t['token']; //echo $t['token'] . "/" . $t['tag'] . " "; //echo "\n"; $wflag = 1; $i = $i + 1; } if ($new == 'ADD') { $addr[$j] = $t['token']; //echo $t['token'] . "/" . $t['tag'] . " "; //echo "\n"; $aflag = 1; $j = $j + 1; } if ($new == 'NN') { $noun[$k] = $t['token']; //echo $t['token'] . "/" . $t['tag'] . " "; //echo "\n"; $nflag = 1; $k = $k + 1; } if ($new == 'AGE') { $age[$k] = $t['token']; //echo $t['token'] . "/" . $t['tag'] . " "; //echo "\n"; $oflag = 1; $pp = $pp + 1; } //$i=$i+1; echo "\n"; } /*for($m=0;$m<$i;$m++) {echo "Noun ".$j.": ".$noun[$j]."<br>"; }*/ if ($nflag == 0) { $noun[0] = 'llllllllll'; } if ($wflag == 1) { checkweek($week); } elseif ($oflag == 1) { checkage($noun); } elseif ($aflag == 1) { checkadd($noun); } else { if ($nflag == 1 && $aflag == 0 && $oflag == 0) { checknoun($noun); } } //echo $i; }