function generateClassForm() { echo "<form method=\"GET\" action=\"classes.php\">"; // Radio buttons to choose what to search for makeRadioButtons("selectMode", array("className", "repeatedOn", "instructor.name")); echo " "; // Allow user to type in a string to compare to makeTextInput("select", "Search..."); // Choose which attributes to project from query echo "<br>Display:"; makeCheckbox("activity_ID", 1); echo "Activity ID"; makeCheckbox("name", 1); echo "Name"; makeCheckbox("day", 1); echo "Start Date"; makeCheckbox("start_time", 1, TRUE); echo "Start Time"; makeCheckbox("end_time", 1, TRUE); echo "End Time"; makeCheckbox("repeatedOn", 1); echo "Repeats On"; makeCheckbox("NumOfSessions", 1); echo "#ofSessions"; makeCheckbox("roomNum", 1); echo "Room"; makeCheckbox("maxSize", 1); echo "Max Size"; makeCheckbox("price", 1); echo "Price"; makeCheckbox("teaches.name", 1); echo "Instructor"; echo "<br>"; echo "<input class=\"pure-button\"type=\"submit\" value=\"Filter\"></form>"; }
function writeContent() { global $sId, $aStates, $isPost, $sName, $sEmail, $nPhone, $sAddress, $sAddress2, $sCity, $sState, $nZip, $bAdmin, $bActive; if (!empty($sId)) { addHidden('use_id', $sId); } addField(makeInput('Name', 'use_name', $sName), true); addField(makeEmail('Email Address', 'use_email', $sEmail), true); addField(makePassword('Password', 'use_password')); addField(makeInput('Phone', 'use_phone', $nPhone, 'size="13"')); addField(makeInput('Address', 'use_address', $sAddress, 'size="30"')); addField(makeInput('Address 2', 'use_address2', $sAddress2, 'size="30"')); addField(makeInput('City', 'use_city', $sCity)); addField(makeSelect('State', 'use_state', $aStates, $sState)); addField(makeInput('Zip', 'use_zip', $nZip, 'size="10"')); addField(makeCheckbox('Admin', 'use_admin', $bAdmin)); addField(makeCheckbox('Active', 'use_active', $bActive)); addField(makeSubmit('Save', 'save') . ' ' . makeCancel('Cancel', 'cancel')); writeDataForm($_SERVER['PHP_SELF'], 'user'); }
function writeContent() { global $results; ?> <h2>User Management</h2> <form action="<?php echo $_SERVER['PHP_SELF']; ?> " method="post"> <table class="grid"> <thead> <tr> <th></td> <th>Name</th> <th>Email</th> <th>Address</th> <th>Phone</th> <th>Admin</th> </tr> </thead> <tbody> <?php while ($rs = mysql_fetch_array($results, MYSQL_ASSOC)) { ?> <tr<?php echo !$rs['use_active'] ? ' class="inactive"' : ''; ?> > <td><?php echo makeCheckbox('', $rs['use_id']); ?> </td> <td><a href="user-edit.php?id=<?php echo $rs['use_id']; ?> " alt="<?php echo $rs['use_image_path']; ?> " rel="tooltip"><?php echo $rs['use_name']; ?> </a></td> <td><?php echo '<a href="mailto:' . $rs['use_email'] . '">' . $rs['use_email'] . '</a>'; ?> </td> <td><?php echo $rs['use_address'] . ' ' . $rs['use_address2'] . '<br />' . $rs['use_city'] . ' ' . $rs['use_state'] . ' ' . $rs['use_zip']; ?> </td> <td><?php echo formatPhone($rs['use_phone']); ?> </td> <td><?php echo $rs['use_admin'] ? 'Yes' : 'No'; ?> </td> </tr> <?php } ?> </tbody> </table> <?php echo makeButton('Add User', 'add') . ' ' . makeSubmit('Delete User(s)', 'delete') . ' ' . makeButton('Download Data', 'csv'); ?> </form> <?php }
<div class="hidden-xs"> </div> <ul class="peaklist"> <?php for ($i = 16; $i < 31; $i++) { echo makeCheckbox($ADK_PEAKS->peaks[$i]); } ?> </ul> </div> <div class="col-xs-12 col-sm-4" style="margin:0;"> <div class="hidden-xs"> </div> <ul class="peaklist"> <?php for ($i = 31; $i < 46; $i++) { echo makeCheckbox($ADK_PEAKS->peaks[$i]); } ?> </ul> </div> <div class="col-xs-12" style="margin-top:18px;"> <div class="hr hr75"></div> </div> <div class="col-xs-12" style="margin-top:45px;"> <p class="font-italic"> I acknowledge that my Adirondack 46er Correspondent does not speak for the Adirondack 46ers Club and that the club is not responsible accuracy, content, completeness, legality, or reliability of the information contained or relayed on this website. Further the club is not responsible for any injury relating to information received and acted upon within the correspondent process.
function PageCompPageMainCode() { global $sex_sel; global $country_sel; global $age_start_sel; global $age_end_sel; global $onl_only; global $pic_only; global $site; global $p_num; global $page; global $pages_num; global $p_per_page; global $page_first_p; global $pages_num; global $search_start_age; global $search_end_age; global $max_thumb_width; global $max_thumb_height; $query = "SELECT * FROM ProfilesDesc WHERE `name` IN ( 'Sex', 'Country')"; $res = db_res($query); while ($arr = mysql_fetch_array($res)) { switch ($arr['name']) { case 'Sex': $sex_sel = $sex_sel ? $sex_sel : 'male,female'; $sex_options = makeCheckbox('sex', $arr['extra'], $sex_sel); break; case 'Country': $country_sel = $country_sel ? $country_sel : 'all'; //getParam('default_country'); $country_options = makeList('country', '', $arr['extra'], $country_sel, 'onchange="javascript: flagImage = document.getElementById(\'flagImageId\'); if (this.value == \'all\') {flagImage.src = \'' . $site['images'] . 'spacer.gif\';} else {flagImage.src = \'' . $site['flags'] . '\' + this.value.toLowerCase() + \'.gif\';}"'); break; default: break; } } $age_start_sel = $age_start_sel ? $age_start_sel : $search_start_age; $age_end_sel = $age_end_sel ? $age_end_sel : $search_end_age; $age_option_start = makeList('age_start', "{$search_start_age}-{$search_end_age}", '', $age_start_sel); $age_option_end = makeList('age_end', "{$search_start_age}-{$search_end_age}", '', $age_end_sel); $photo_only_check = '<input type="checkbox" name="photo_only" id="photo_only_id" ' . ($pic_only ? 'checked="checked"' : '') . ' /><label for="photo_only_id"><b>' . _t('_With photos only') . '</b></label>'; $online_only_check = '<input type="checkbox" name="online_only" id="online_only_id" ' . ($onl_only ? 'checked="checked"' : '') . ' /><label for="online_only_id"><b>' . _t('_online only') . '</b></label>'; $country_def_flag = $country_sel == 'all' ? $site['images'] . 'spacer.gif' : $site['flags'] . strtolower($country_sel) . '.gif'; $ret = ' <form id="browse_form" action="' . $_SERVER['PHP_SELF'] . '" method="get"> <div class="browse_form_wrapper"> <div class="browse_form_row"> <div class="clear_both"></div> <div class="label">' . _t('_Sex') . ':</div> <div class="value">' . $sex_options . '</div> <div class="clear_both"></div> </div> <div class="browse_form_row"> <div class="clear_both"></div> <div class="label">' . _t('_DateOfBirth') . ':</div> <div class="value">' . _t("from") . ' ' . $age_option_start . ' ' . _t("to") . ' ' . $age_option_end . '</div> <div class="clear_both"></div> </div> <div class="browse_form_row"> <div class="clear_both"></div> <div class="label">' . _t('_Country') . ':</div>' . '<div class="value">' . $country_options . ' <img id="flagImageId" src="' . $country_def_flag . '" alt="flag" /> </div> <div class="clear_both"></div> </div> <div class="only"> ' . $photo_only_check . ' ' . $online_only_check . ' </div> <div class="submit"> <input id="search" name="search" type="submit" value="' . _t('_Show') . '" /> </div> </div> </form> '; //==================================================================================================== //----------------------- search results ------------------------------------------------- //==================================================================================================== $page = (int) $_GET[page]; $p_per_page = (int) $_GET[p_per_page]; $aVar = array(30, 60, 90); if (!$page) { $page = 1; } if (!$p_per_page) { $p_per_page = 30; } $real_first_p = (int) ($page - 1) * $p_per_page; $page_first_p = $real_first_p + 1; $temp_arr = explode(',', $sex_sel); foreach ($temp_arr as $value) { if ($value) { $sex_add .= " `Sex` = '{$value}' OR "; } } if ($country_sel && 'all' != $country_sel) { $country_add = " `Country` = '{$country_sel}' AND "; } if ($age_start_sel) { $age_add .= " ( (YEAR(NOW()) - {$age_start_sel}) >= YEAR(`DateofBirth`) ) AND "; } if ($age_end_sel) { $age_add .= " ( (YEAR(NOW()) - {$age_end_sel}) <= YEAR(`DateofBirth`) ) AND "; } if ($pic_only) { $pic_add = " AND `Picture` = '1' "; } if ($onl_only) { $onl_add = " AND (LastNavTime > SUBDATE(NOW(), INTERVAL " . getParam("member_online_time") . " MINUTE)) "; } $sex_add = $sex_add ? '(' . $sex_add . ' 1=0 ) AND ' : ''; $age_add = $age_add ? '(' . $age_add . ' 1=1 )' : ''; $sql_add = $sex_add . $country_add . $age_add . $pic_add . $onl_add; $p_num = db_arr("SELECT COUNT(*) FROM Profiles WHERE {$sql_add} AND `Status` = 'Active'"); $p_num = $p_num[0]; $pages_num = ceil($p_num / $p_per_page); $profiles_list_query = "SELECT `ID`, `NickName`, `Sex`, `DateOfBirth` FROM Profiles WHERE {$sql_add} AND `status`='Active' ORDER BY `Picture` DESC LIMIT {$real_first_p}, {$p_per_page};"; $function = ' $ret = \'?\'; foreach ( $_GET as $key => $value ) if ( $value ) $ret .= $key . \'=\' . $value . \'&\'; return $ret; '; $ret .= '<div id="container_result" style="border: 0px solid #000000">'; $ret .= '<div style="margin-bottom:10px;"><center>' . ResNavigationRet('ProfilesUpper', 0, $function, $aVar) . '</center></div>'; if ($p_num > 0) { $res = db_res($profiles_list_query); $iI = 1; while ($arr = mysql_fetch_array($res)) { $user_is_online = get_user_online_status($arr['ID']); if ($iI == 6) { $cont = '<div class="browse_thumb_thin">'; } else { $cont = '<div class="browse_thumb">'; } $cont .= getProfileOnlineStatus($user_is_online) . get_member_thumbnail($arr['ID'], 'none') . '<div class="browse_nick"><a href="' . getProfileLink($arr['ID']) . '">' . $arr['NickName'] . '</a></div></div>'; $ret .= $cont; $iI++; if ($iI > 6) { $iI = 1; } } } else { $ret .= '<div class="no_result">'; $ret .= '<div>' . _t('_No results found') . '</div>'; $ret .= '</div>'; } $ret .= '<div style="clear:both;margin-top:10px;"><center>' . ResNavigationRet('ProfilesLower', 0, $function, $aVar) . '</center></div>'; $ret .= '</div>'; return $ret; }
function writeContent() { global $results; ?> <h2>Visitor Submissions</h2> <form action="<?php echo $_SERVER['PHP_SELF']; ?> " method="post"> <table class="grid"> <thead> <tr> <th title="Check All Messages"><?php echo makeCheckbox('', 'all'); ?> </td> <th>Name</th> <th>Email</th> <th>Address</th> <th>Phone</th> <th>Comments</th> <th>Date</th> </tr> </thead> <tbody> <?php while ($rs = mysql_fetch_array($results, MYSQL_ASSOC)) { ?> <tr> <td><?php echo makeCheckbox('', $rs['con_id']); ?> </td> <td><?php echo $rs['con_firstname'] . ' ' . $rs['con_lastname']; ?> </td> <td><?php echo '<a href="mailto:' . $rs['con_email'] . '">' . $rs['con_email'] . '</a>'; ?> </td> <td><?php echo $rs['con_address'] . ' ' . $rs['con_address2'] . '<br />' . $rs['con_city'] . ' ' . $rs['con_state'] . ' ' . $rs['con_zip']; ?> </td> <td><?php echo formatPhone($rs['con_phone']); ?> </td> <td><?php echo $rs['con_comments']; ?> </td> <td><?php echo formatDate($rs['con_date'], false); ?> </td> </tr> <?php } ?> </tbody> </table> <?php echo makeSubmit('Delete Message(s)', 'delete'); echo makeButton('Download Data', 'csv'); ?> </form> <?php }