function PageCompPageMainCode() { global $site; global $oTemplConfig; $aPhoto = getVotingItem(); $check_res = checkAction($_COOKIE['memberID'], ACTION_ID_RATE_PHOTOS); if ($check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) { $ret = ' <table width="100%" cellpadding="4" cellspacing="4" border="0"> <tr> <td align="center">' . $check_res[CHECK_ACTION_MESSAGE] . '</td> </tr> </table>'; return $ret; } $ret = ''; if ($_GET['prev_id']) { $ret .= showPreviousRated((int) $_GET['prev_id']); } if ($oTemplConfig->customize['rate']['showSexSelector']) { $ret .= '<div class="rate_sex_form">'; $ret .= '<form method="post" name="FormVote" action="' . $_SERVER['PHP_SELF'] . '">'; $ret .= '<span>'; $ret .= _t("_Show me"); $ret .= '</span>'; $ret .= '<span>'; $ret .= '<select name="showme" onchange="document.forms[\'FormVote\'].submit()">' . "\n"; $selected_all = $_REQUEST['showme'] == 'all' || strlen(trim($_REQUEST['showme'])) == 0 ? ' selected="selected" ' : ''; $ret .= '<option value="all"' . $selected_all . '>' . _t("_all") . '</option>'; $ret .= SelectOptions('Sex', $_REQUEST['showme']); $ret .= '</select>'; $ret .= '</span>'; $ret .= '</form>'; $ret .= '</div>'; } if (empty($aPhoto)) { $ret .= _t_action('_there_is_no_photo_that_you_can_rate'); } else { if ($oTemplConfig->customize['rate']['showProfileInfo']) { $ret .= '<div class="clear_both"></div>'; $ret .= ProfileDetails($aPhoto['med_prof_id']); $ret .= '<div class="clear_both"></div>'; } $ret .= getRatingPhoto($aPhoto); $oVotingView = new BxTemplVotingView('media', (int) $aPhoto['med_id']); if ($oVotingView->isEnabled()) { $sUrlAdd = ''; if ($_REQUEST['showme']) { $sUrlAdd .= 'showme=' . $_REQUEST['showme'] . '&'; } $ret .= "\r\n\t\t\t\t<script>\r\n\t\t\t\t\tBxDolVoting.prototype.onvote = function (fRate, iCount)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdocument.location = '{$site['url']}rate.php?{$sUrlAdd}prev_id=' + this._iObjId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tBxDolVoting.prototype.onvotefail = function ()\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdocument.location = '{$site['url']}rate.php?{$sUrlAdd}prev_id=' + this._iObjId;\r\n\t\t\t\t\t}\r\n\t\t\t\t</script>"; $ret .= '<div style="margin-left:55px">' . $oVotingView->getBigVoting() . '</div>'; } } return $ret; }
/** * Custom Menu Function for Profile **/ function DesignQuickSearch() { global $site; global $search_start_age; global $search_end_age; $gl_search_start_age = (int) $search_start_age; $gl_search_end_age = (int) $search_end_age; if ($_COOKIE['memberID'] > 0) { $arr_sex = getProfileInfo($_COOKIE['memberID']); //db_arr("SELECT Sex FROM Profiles WHERE ID = ".(int)$_COOKIE['memberID']); $member_sex = $arr_sex['Sex']; } else { $member_sex = 'male'; } ob_start(); ?> <!-- Quick Search --> <form method="get" action="search_result.php"> <table cellspacing=2 cellpadding=0 border=0 align="center"> <tr> <td align=right><?php echo _t("_I am a"); ?> - </td> <td><select name="Sex"> <?php echo SelectOptions("Sex", $member_sex); ?> </select> </td> </tr> <tr> <td align=right><?php echo _t("_Seeking for a"); ?> - </td> <td><select name="LookingFor"> <?php echo SelectOptions("LookingFor", $member_sex == 'male' ? 'female' : 'male'); ?> </select></td> </tr> <tr> <td align=right><?php echo _t("_Aged from"); ?> - </td> <td><select name="DateOfBirth_start"> <?php for ($i = $gl_search_start_age; $i < $gl_search_end_age; $i++) { $sel = $i == $gl_search_start_age ? 'selected="selected"' : ''; echo "<option value=\"{$i}\" {$sel}>{$i}</option>"; } ?> </select> </td> </tr> <tr> <td align=right><?php echo _t("_to"); ?> - </td> <td><select name="DateOfBirth_end"> <?php for ($i = $gl_search_start_age; $i <= $gl_search_end_age; $i++) { $sel = $i == $gl_search_end_age ? 'selected="selected"' : ''; echo "<option value=\"{$i}\" {$sel}>{$i}</option>"; } ?> </select> </td> </tr> <tr> <td align=right><?php echo _t("_With photos only"); ?> - </td> <td><input type=checkbox name=photos_only /></td> </tr> <tr> <td></td> <td><input class=no type=submit value="<?php echo _t("_Find"); ?> !" /></td> </tr> </table></form> <!-- [ END ] Quick Search --> <?php $ret = ob_get_contents(); ob_end_clean(); return $ret; }
case 10: // Case generated by BulkChange::DisplayImportHistory $iChange = (int) utils::ReadParam('changeid', 0); BulkChange::DisplayImportHistoryDetails($oPage, $iChange); break; case 5: LoadData($oPage); break; case 4: Preview($oPage); break; case 3: SelectMapping($oPage); break; case 2: SelectOptions($oPage); break; case 1: case 6: // Loop back here when we are done // Loop back here when we are done default: Welcome($oPage); } $oPage->output(); } catch (CoreException $e) { require_once APPROOT . '/setup/setuppage.class.inc.php'; $oP = new SetupPage(Dict::S('UI:PageTitle:FatalError')); $oP->add("<h1>" . Dict::S('UI:FatalErrorMessage') . "</h1>\n"); $oP->error(Dict::Format('UI:Error_Details', $e->getHtmlDesc())); $oP->output();
/** * Zip Locator Code */ function PageCodeZipLocator() { global $w_ex; global $member_sex; global $bgcolor; global $tmpl; global $site; global $search_start_age; global $search_end_age; $gl_search_start_age = (int) $search_start_age; $gl_search_end_age = (int) $search_end_age; $ret = <<<EOF <!-- Search By Distanvce --> EOF; ob_start(); ?> <form method="get" action="search_result.php"> <center> <table class=small cellspacing=3 cellpadding=0 border="0"> <tr> <td><?php echo _t("_I am"); ?> </td> <td><select name="Sex"> <?php echo SelectOptions("Sex", $member_sex); ?> </select></td> <td> <?php echo _t("_seeking a"); ?> </td> <td><select name="LookingFor"> <?php echo SelectOptions("LookingFor", $member_sex == 'male' ? 'female' : 'male'); ?> </select></td> <td> <?php echo _t("_from"); ?> </td> <td><select name="DateOfBirth_start"> <?php for ($i = $gl_search_start_age; $i <= $gl_search_end_age; $i++) { $sel = $i == $gl_search_start_age ? 'selected' : ''; echo "<option value={$i} {$sel}>{$i}</option>"; } ?> </select></td> <td> <?php echo _t("_to"); ?> </td> <td><select name="DateOfBirth_end"> <?php for ($i = $gl_search_start_age; $i <= $gl_search_end_age; $i++) { $sel = $i == $gl_search_end_age ? 'selected' : ''; echo "<option value={$i} {$sel}>{$i}</option>"; } ?> </select></td> </table> <table class=small cellspacing=3 cellpadding=0 border="0"> <tr> <td> <?php echo _t("_living within"); ?> <input class=no type=text name=distance size=12 /> <select name="metric"> <option selected="selected" value="miles"><?php echo _t("_miles"); ?> </option> <option value="km"><?php echo _t("_kilometers"); ?> </option> </select> <?php echo _t("_from zip/postal code"); ?> <input class=no type=text name=zip size=12 /> </td> </tr> </table> <table class=small cellspacing=3 cellpadding=0> <tr> <td> <input type=checkbox name="online_only" /><?php echo _t("_online only"); ?> </td> <td> <input type=checkbox name=photos_only /><?php echo _t("_With photos only"); ?> </td> <td> <input class=no type=submit value="<?php echo _t("_Search"); ?> " /> </td> </tr> </table> </center></form> <?php $out = ob_get_clean(); if ($tmpl == 'adl') { $w_ex1 = 0; } $ret .= DesignBoxContentBorder(_t("_Search by distance"), $out); return $ret; }
function getBlockCode_QuickSearch() { global $site; //global $oTemplConfig; global $search_start_age; global $search_end_age; $gl_search_start_age = (int) $search_start_age; $gl_search_end_age = (int) $search_end_age; if ((int) $_COOKIE['memberID'] > 0) { $arr_sex = getProfileInfo((int) $_COOKIE['memberID']); //db_arr("SELECT Sex FROM Profiles WHERE ID = ".(int)$_COOKIE['memberID']); $member_sex = $arr_sex['Sex']; } else { $member_sex = 'male'; } $ret = '<div class="qsi_wrapper">'; $ret .= '<form action="search.php" method="get">'; $ret .= '<div class="qsi_line">'; $ret .= '<div class="qsi_first">'; $ret .= _t("_I am a"); $ret .= '</div>'; $ret .= '<div class="qsi_second">'; $ret .= '<select name="LookingFor[]">'; $ret .= SelectOptions("LookingFor", $member_sex); $ret .= '</select>'; $ret .= '</div>'; $ret .= '</div>'; $ret .= '<div class="qsi_line">'; $ret .= '<div class="qsi_first">'; $ret .= _t("_seeking a"); $ret .= '</div>'; $ret .= '<div class="qsi_second">'; $ret .= '<select name="Sex[]">'; $ret .= SelectOptions("Sex", $member_sex == 'male' ? 'female' : 'male', 'LKey2'); $ret .= '</select>'; $ret .= '</div>'; $ret .= '</div>'; $ret .= '<div class="qsi_line">'; $ret .= '<div class="qsi_first">'; $ret .= _t("_aged"); $ret .= '</div>'; $ret .= '<div class="qsi_second">'; $ret .= '<span style="position:absolute; top:0px; left:0px;">'; $ret .= '<select name="DateOfBirth[0]">'; for ($i = $gl_search_start_age; $i <= $gl_search_end_age; $i++) { $sel = $i == $gl_search_start_age ? 'selected="selected"' : ''; $ret .= '<option value="' . $i . '" ' . $sel . '>' . $i . '</option>'; } $ret .= '</select>'; $ret .= '</span>'; $ret .= '<div style="position:absolute; top:2px; left:60px;">'; $ret .= _t("_to"); $ret .= '</div>'; $ret .= '<span style="position:absolute; top:0px; left:80px;">'; $ret .= '<select name="DateOfBirth[1]">'; $i = 0; for ($i = $gl_search_start_age; $i <= $gl_search_end_age; $i++) { $sel = $i == $gl_search_end_age ? 'selected="selected"' : ''; $ret .= '<option value="' . $i . '" ' . $sel . '>' . $i . '</option>'; $ret .= "\n"; } $ret .= '</select>'; $ret .= '</span>'; $ret .= '</div>'; $ret .= '</div>'; /* $ret .= '<div class="qsi_line">'; $ret .= '<div class="qsi_first">'; $ret .= _t("_within"); $ret .= '</div>'; $ret .= '<div class="qsi_second">'; $ret .= '<span style="position:absolute; top:0px; left:0px;">'; $ret .= '<input type="text" name="distance" style="width:46px;" />'; $ret .= '</span>'; $ret .= '<span style="position:absolute; top:0px; left:80px;" >'; $ret .= '<select name="metric" style="position:relative;float:left;width:50px;left:0px;">'; $ret .= '<option selected="selected" value="miles">' . _t("_miles") . '</option>'; $ret .= '<option value="km">' . _t("_km") . '</option>'; $ret .= '</select>'; $ret .= '</span>'; $ret .= '</div>'; $ret .= '</div>'; $ret .= '<div class="qsi_line">'; $ret .= '<div class="qsi_first">'; $ret .= _t("_from ZIP"); $ret .= '</div>'; $ret .= '<div class="qsi_second">'; $ret .= '<input type="text" name="zip" />'; $ret .= '</div>'; $ret .= '</div>'; */ $ret .= '<div class="qsi_line" style="text-align:center; margin-top:3px;">'; $ret .= '<input type="checkbox" name="photos_only" id="qsi_photos_only" style="width:15px; height:15px;" /> '; $ret .= '<label for="qsi_photos_only">' . _t("_With photos only") . '</label>'; $ret .= '</div>'; $ret .= '<div class="qsi_line" style="text-align:center; margin-top:3px;">'; $ret .= '<input type="submit" value=' . _t('_Search') . ' />'; $ret .= '</div>'; $ret .= '</form>'; $ret .= '</div>'; return $ret; }
function PageCodeSearchForm() { global $oPF; global $sPageHeader; global $sSearchMode; ob_start(); ?> <form method="GET" action="<?php echo $_SERVER['PHP_SELF']; ?> "> <table class="search_form" cellspacing="0"> <?php foreach ($oPF->aBlocks as $aBlock) { ?> <tr class="search_form_block"> <th colspan="2"><?php echo _t($aBlock['Caption']); ?> </th> </tr> <?php foreach ($aBlock['Items'] as $aItem) { ?> <tr class="search_form_row"> <td class="search_form_caption"><?php echo _t($aItem['Caption']); ?> :</td> <td class="search_form_value"> <?php //draw the control switch ($aItem['Type']) { case 'text': case 'area': ?> <input type="text" name="<?php echo $aItem['Name']; ?> " class="input_text" /> <?php break; case 'date': case 'range': case 'num': echo _t('_From'); ?> <input type="text" name="<?php echo $aItem['Name']; ?> [0]" class="input_date" /> <?php echo _t('_To'); ?> <input type="text" name="<?php echo $aItem['Name']; ?> [1]" class="input_date" /> <?php break; case 'select_one': case 'select_set': switch ($aItem['Control']) { case 'select': ?> <select name="<?php echo $aItem['Name']; ?> []" multiple="multiple" class="input_select"> <?php echo SelectOptions($aItem['Name']); ?> </select> <?php break; case 'radio': case 'checkbox': $aValues = getFieldValues($aItem['Name']); foreach ($aValues as $sKey => $sValue) { ?> <input type="checkbox" name="<?php echo $aItem['Name']; ?> []" value="<?php echo $sKey; ?> " id="<?php echo $aItem['Name']; ?> _<?php echo $sKey; ?> " /> <label for="<?php echo $aItem['Name']; ?> _<?php echo $sKey; ?> "><?php echo _t($sValue); ?> </label> <?php } break; } break; case 'bool': ?> <input type="checkbox" name="<?php $aItem['Name']; ?> " value="1" /> <?php break; case 'system': switch ($aItem['Name']) { case 'Couple': ?> <input type="checkbox" name="Couple[0]" value="1" id="Couple_0" /> <label for="Couple_0"><?php echo _t('_Single'); ?> </label> <input type="checkbox" name="Couple[1]" value="1" id="Couple_1" /> <label for="Couple_1"><?php echo _t('_Couple'); ?> </label> <?php break; case 'Keyword': ?> <input type="text" name="<?php echo $aItem['Name']; ?> " class="input_text" /> <?php break; case 'Location': echo 'Not implemented yet'; $sLivingWithinC = _t("_living within"); $sMilesC = _t("_miles"); $sKmC = _t("_kilometers"); $sFromZipC = _t("_from zip/postal code"); $sRet = <<<EOF <table class=small cellspacing=3 cellpadding=0 border="0"> <tr> <td> \t {$sLivingWithinC} <input class=no type=text name="distance" size=12 /> <select name="metric"> \t<option selected="selected" value="miles">{$sMilesC}</option> \t<option value="km">{$sKmC}</option> </select> \t {$sFromZipC} <input class=no type=text name=zip size=12 /> </td> </tr> </table> EOF; echo $sRet; break; } break; } ?> </td> </tr> <?php } } ?> <tr> <td class="search_form_submit_row" colspan="2"> <input type="checkbox" name="online_only" id="online_only" /> <label for="online_only"><?php echo _t('_online only'); ?> </label> <input type="checkbox" name="photos_only" id="photos_only" /> <label for="photos_only"><?php echo _t('_With photos only'); ?> </label> <input type="submit" value="<?php echo _t('_Fetch'); ?> " /> </td> </tr> </table> </form> <?php echo DesignBoxContentBorder($sPageHeader, ob_get_clean()); }