Jump to content

kathymack

Members
  • Posts

    15
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

kathymack's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi I have installed a widget on my wordpress called "php text widget". What I iwant to do is to call the wp function so that they user clicks link they are automatically logged out and redirected to login page here is my code below when I test this code I get the following error: The requested URL /wp_logout_url( was not found on this server. <?php $redirect = "http://www.mysite.com/wp-login.php"; if ( is_user_logged_in() ) { print ("<a href=wp_logout_url( $redirect );>LOGOUT</a>"); } ?>
  2. Hi I wrote some basic custom php code that presents a form to a user, they submit their details and an email gets sent to me. I checked and the fields from the form are being carried over. Up to about a week ago it was working and now it has stopped working and I have no idea why. I have checked with my isp and no changes were made to anything php version is 5.2 php-ini.txt contact-process.php
  3. Here is my kath.php file contents Not the best written code, however... I have put these 2 files in the root folder. <?php define ("WP_USE_THEMES", false); define ("MAX_PER_PAGE", 3); require ("wp-load.php"); include ("pagination.class.php"); $query = new WP_Query( array( 'showposts' => 25, 'post_type' => 'post', 'numberposts' => -1, ) ); $posts = $query->get_posts(); $sAllTitles = array(); $sAllDates = array(); $sAllContent = array(); $iCount = 0; if ($posts) { foreach($posts as $post) { $sAllTitles[$iCount] = $post->post_title; $sAllDates[$iCount] = $post->post_date; $sAllContent[$iCount]= $post->post_content; $PostData[] = array( 'PTitle' => $sAllTitles[$iCount], 'PDate' => $sAllDates[$iCount], 'PCont' => $sAllContent[$iCount], ); $iCount++; } } ?> <html> <head> </head> <body> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>BLOG POSTS</title> </head> here is the pagination.class.php file <?php if (count($PostData)) { $pagination = new pagination($PostData, (isset($_GET['page']) ? $_GET['page'] : 1), MAX_PER_PAGE); $pagination->setShowFirstAndLast(true); $PostPages = $pagination->getResults(); echo $pageNumbers = '<div class=pagination>'.$pagination->getLinks().'</div>'; if (count($PostPages) != 0) { print("<br/>"); print ("My Blog Posts"); print("<br/><br/>"); foreach ($PostPages as $PostArray) { print ('<div class=post>'); print ('<h2>' . $PostArray['PTitle'] . '</h2>'); print ('<div class=InfoText>' . $PostArray['PDate'] . '</div>'); print ('<div class=entryBlogText>'); print ($PostArray['PCont']); print ('</div>'); print ('</div>'); print ('<br/>'); } print ($pageNumbers); print ('<br/><br/><br/>'); } } wp_reset_postdata(); ?> </body> </html> Here is the pagination.class.php file <?php class pagination { /** * Properties array * @var array * @access private */ private $_properties = array(); /** * Default configurations * @var array * @access public */ public $_defaults = array( 'page' => 1, 'perPage' => 10 ); /** * Constructor * * @param array $array Array of results to be paginated * @param int $curPage The current page interger that should used * @param int $perPage The amount of items that should be show per page * @return void * @access public */ public function __construct($array, $curPage = null, $perPage = null) { $this->array = $array; $this->curPage = ($curPage == null ? $this->defaults['page'] : $curPage); $this->perPage = ($perPage == null ? $this->defaults['perPage'] : $perPage); } /** * Global setter * * Utilises the properties array * * @param string $name The name of the property to set * @param string $value The value that the property is assigned * @return void * @access public */ public function __set($name, $value) { $this->_properties[$name] = $value; } /** * Global getter * * Takes a param from the properties array if it exists * * @param string $name The name of the property to get * @return mixed Either the property from the internal * properties array or false if isn't set * @access public */ public function __get($name) { if (array_key_exists($name, $this->_properties)) { return $this->_properties[$name]; } return false; } /** * Set the show first and last configuration * * This will enable the "<< first" and "last >>" style * links * * @param boolean $showFirstAndLast True to show, false to hide. * @return void * @access public */ public function setShowFirstAndLast($showFirstAndLast) { $this->_showFirstAndLast = $showFirstAndLast; } /** * Set the main seperator character * * By default this will implode an empty string * * @param string $mainSeperator The seperator between the page numbers * @return void * @access public */ public function setMainSeperator($mainSeperator) { $this->mainSeperator = $mainSeperator; } /** * Get the result portion from the provided array * * @return array Reduced array with correct calculated offset * @access public */ public function getResults() { // Assign the page variable if (empty($this->curPage) !== false) { $this->page = $this->curPage; // using the get method } else { $this->page = 1; // if we don't have a page number then assume we are on the first page } // Take the length of the array $this->length = count($this->array); // Get the number of pages $this->pages = ceil($this->length / $this->perPage); // Calculate the starting point $this->start = ceil(($this->page - 1) * $this->perPage); // return the portion of results return array_slice($this->array, $this->start, $this->perPage); } /** * Get the html links for the generated page offset * * @param array $params A list of parameters (probably get/post) to * pass around with each request * @return mixed Return description (if any) ... * @access public */ public function getLinks($params = array()) { // Initiate the links array $plinks = array(); $links = array(); $slinks = array(); // Concatenate the get variables to add to the page numbering string $queryUrl = ''; if (!empty($params) === true) { unset($params['page']); $queryUrl = '&'.http_build_query($params); } // If we have more then one pages if (($this->pages) > 1) { // Assign the 'previous page' link into the array if we are not on the first page if ($this->page != 1) { if ($this->_showFirstAndLast) { $plinks[] = ' <a href="?page=1'.$queryUrl.'">«« First </a> '; } $plinks[] = ' <a href="?page='.($this->page - 1).$queryUrl.'">« Prev</a> '; } // Assign all the page numbers & links to the array for ($j = 1; $j < ($this->pages + 1); $j++) { if ($this->page == $j) { $links[] = ' <a class="selected">'.$j.'</a> '; // If we are on the same page as the current item } else { $links[] = ' <a href="?page='.$j.$queryUrl.'">'.$j.'</a> '; // add the link to the array } } // Assign the 'next page' if we are not on the last page if ($this->page < $this->pages) { $slinks[] = ' <a href="?page='.($this->page + 1).$queryUrl.'"> Next » </a> '; if ($this->_showFirstAndLast) { $slinks[] = ' <a href="?page='.($this->pages).$queryUrl.'"> Last »» </a> '; } } // Push the array into a string using any some glue return implode(' ', $plinks).implode($this->mainSeperator, $links).implode(' ', $slinks); } return; } }
  4. Hi I am not sure if this is the right area for my question, but here goes. I have a generic script that reads in my wordpress posts and does some pagination. This code works well on my server (php version 5.2.17): http://torontomississaugaoakvilleproperties.com/kath.php Here is the pdf of the php.ini info: http://torontomississaugaoakvilleproperties.com/php-5-2-17.pdf However when I copied it over to another server, the pagination code does not display (php version 5.3.10) http://blueshiftdesign.org/blog/kath.php Here is the pdf of the php.ini file info: http://torontomississaugaoakvilleproperties.com/php5-3-10.pd There shouldn't be any reason for this to happen, so I tried to compare the php.ini file from both servers and there are some differences, one in particular which in the 5.2.17 version disable_functions is set to "no value" in the 5.2.17 (which works) and in the 5.3.10 version disable_functions contains a large string of data. I don't have much experience with the php.ini file so any help is appreciated.
  5. <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get">
  6. Hi I have changed the code as suggested. It's still not working <?php $sPath_Step3e = "http://career-updates.org/jobs-new/test-email.php?fname=$sFName&lname=$sLName&job=$sJobTitle&zip=$sZip&radius=$iRadius&num_days_back=$sDaysBack"; /****************************************************************************/ /* (1a) GET VARS */ /****************************************************************************/ $sFName = $_GET["fname"]; $sLName = $_GET["lname"]; $sJobTitle = $_GET["job"]; $sZip = $_GET["zip"]; $sWhat = $_GET['what']; $sWhere = $_GET['where']; $sTodaysDate = date("F j, Y"); $sFullName = $sFName . " " . $sLName; $sDaysBack = $_GET["num_days_back"]; $iRadius = $_GET["radius"]; if (! isset($sDaysBack)) { $sDaysBack = 30; } if (! isset($iRadius)) { $iRadius = 25; } $iLimit = 10; $iLatLong = 1; $sPubKey = "216811061177745"; $sSort = "date"; $sUseragent = $_SERVER["HTTP_USER_AGENT"]; $sIPaddress = $_SERVER["REMOTE_ADDR"]; /****************************************************************************/ /* (9) DISPLAY PAGE */ /****************************************************************************/ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Career Updates</title> <link rel="stylesheet" href="css/styles_final.css" type="text/css" /> <script type="text/javascript" src="js/functions.js"></script> <script type="text/javascript" src="js/new-validate.js"></script> <script type="text/javascript" language="javascript"> <!-- PreLoad Wait - Script --> <!-- This script and more from http://www.rainbow.arch.scriptmania.com function waitPreloadPage() { //DOM if (document.getElementById){ document.getElementById('prepage').style.visibility='hidden'; }else{ if (document.layers){ //NS4 document.prepage.visibility = 'hidden'; } else { //IE4 document.all.prepage.style.visibility = 'hidden'; } } } // End --> </script> </head> <body onLoad="waitPreloadPage();"> <div id="main"> </div> <div id="wrapper"> <div id="header"> <img src="images/logo.png" style="float:left;margin-left:10px;margin-top:6px;" /> <div id="whatwhere"> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <table border='0' cellspacing='1' style='font-family:arial;' width="370"> <tr><td style='font-size:16px;color:#3d3d3d'><b>what</b></td> <td style='font-size:16px;color:#3d3d3d'><b>where</b> </td> </tr> <tr><td><input type="text" name="what" style="color:#666;"></td> <td><input type="text" name="where" style="color:#666;"></td> </tr> <tr><td valign='top' style='font-size:10px'>job title, keywords or company</td> <td valign='top' style='font-size:10px;padding:0px;margin:0px;border:0px;' > <table border='0' cellpadding='1' width='100%' style='padding:0px;margin:0px;border:0px;'> <tr><td valign='top' style='font-size:10px;padding:0px;margin:0px;border:0px;'>zip only</td> </tr> </table></td></tr> </td></tr></table> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <div style='margin-left:380px;margin-top:-40px;'> <input type="submit" value="" style="background-image: url(images/btn_searchsmall.png);width:87px;height:22px;border:none;cursor: pointer;"> </div> </form> </div> <div id="header2"> <table width='920' border='0'> <tr> <td colspan='2' align='left'> <table border='0' width='920'> <tr style='font-family:Arial;font-size:12px;font-weight:normal;color:DimGray;'> <td width='260'> Search Results: <? print($sFullName); ?> </td> <td align='right' style='font-family:Arial;font-size:12px;font-weight:normal;color:DimGray;'> </td> </tr> <tr> <td colspan='2'> </td> </tr></table> </td> </tr></table> </div> </div> <!-- MAIN CONTAINER --> <div id="container"> <!-- LEFT SIDE --> <div id="side-a"> <div style="margin-left:10px;margin-top:10px;"> <h2>Days Back</h2> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=3> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere);?>" > <input type="submit" value="" style="background-image: url(images/btn3DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=7> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn7DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=14> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn14DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=30> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn30DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value="60"> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn60DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=90> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn90DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <p> </p> <h2>Search Radius</h2> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="5"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn5Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="10"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn10Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="25"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn25Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="50" style="border-style:none;"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn50Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="100"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn100Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <p> </p> <h2>Popular</h2> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "customer-service"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="customer-service"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelCS.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "warehouse"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="warehouse"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelWH.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "data-entry"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="data-entry"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelDE.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "driver"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="driver"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelDR.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "human-resources"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="human-resources"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelHR.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "health-care"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="health-care"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelHC.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "sales-associate"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="sales-associate"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelSA.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> </div> </div> <!-- MIDDLE COLUMN --> <div id="content"> <div style="margin-left:10px;"> <br/><br/> <div id="prepage" style="position:center;margin-top:24px;font-family:Arial;font-size:16px;color:darkred;font-weight:bold;"> Please wait <?php print ($sFName); ?>... Your <?php print ("your"); ?> results are being loaded... </div> <div style="margin-top:-44px;"> <?php $searchString = "http://api.indeed.com/ads/apisearch?"; $searchString .= "q=" . $sJobTitle ."&l=" . $sZip ." &format=xml"; $searchString .= "&limit=".$iLimit ."&latlong=".$iLatLong ."&radius=".$iRadius ."&fromage=".$sDaysBack ."&sort=".$sSort; $searchString .= "&publisher=".$sPubKey."&userip=".$sIPaddress."&useragent=".$sUseragent . "&jpp=" . $iLimit; $xml = simplexml_load_file($searchString) or die ("Unable to load XML file!"); $iTotalResults = $xml->totalresults; print ("<span class='StdText'>Total Jobs: $iTotalResults</span><br/><br/>"); ?> <h2 align="left" style="margin-top: 4px;"> <?php print ("<br/>$sFName here are your $sJobTitle openings near $sZip!"); ?> </h2> <?php if ($iTotalResults > 0) { print ("<table border='0' width='700'>"); foreach ($xml->results->result as $result) { $jobkey = (string)$result->jobkey; $jobTitle = (string)$result->jobtitle; $company = (string)$result->company; $location = (string)$result->city . ", " . (string)$result->state; $postedDate = (string)$result->date; $snippet = (string)$result->snippet; $link = (string)$result->url; $sTempHref = "<a class='job' onmousedown=\"indeed_clk(this,'$jobkey')\" "; $sTempHref .= " href=" . "'" . $link . "'>"; $sTempHref .= $jobTitle . "</a>"; $TheJobs[] = array( 'jobkey' => $jobkey, 'Title' => $sTempHref, 'Company' => $company, 'Location' => $location, 'PDate' => $postedDate, 'Desc' => $snippet, 'ButtonLink' => $link ); $company = preg_replace('/[^(\x20-\x7F)]*/','', $company); $sTempHref = preg_replace('/[^(\x20-\x7F)]*/','', $sTempHref); $snippet = preg_replace('/[^(\x20-\x7F)]*/','', $snippet); print ("<tr>"); print ("<td>"); print ("$sTempHref<br/>"); print ("<span class='StdText'>$company, $location</span><br/>"); print ("<span class='StdTextLight'>$postedDate</span><br/>"); print ("<span class='StdText'>$snippet</span><br/><br/>"); } print ("</td></tr></table>"); } else { print ("<span class='StdText'>No jobs found matching thhe search criteria</span>"); } ?> </div> </div> </div> <!-- RIGHT COLUMN --> <div id="side-b"> <div style='margin-left:20px;margin:top:0px;' align='right' valign='top'> </div> </div> </div> <div id="footer"> </div> </div> </body> </html>
  7. <?php $sPath_Step3e = "http://career-updates.org/jobs-new/final-jobs2.php?fname=$sFName&lname=$sLName&job=$sJobTitle&zip=$sZip&radius=$iRadius&num_days_back=$sDaysBack"; /****************************************************************************/ /* (1a) GET VARS */ /****************************************************************************/ $sFName = $_GET["fname"]; $sLName = $_GET["lname"]; $sJobTitle = $_GET["job"]; $sZip = $_GET["zip"]; $sWhat = $_GET['what']; $sWhere = $_GET['where']; $sTodaysDate = date("F j, Y"); $sFullName = $sFName . " " . $sLName; $sDaysBack = $_GET["num_days_back"]; $iRadius = $_GET["radius"]; if (! isset($sDaysBack)) { $sDaysBack = 30; } if (! isset($iRadius)) { $iRadius = 25; } $iLimit = 10; $iLatLong = 1; $sPubKey = "216811061177745"; $sSort = "date"; $sUseragent = $_SERVER["HTTP_USER_AGENT"]; $sIPaddress = $_SERVER["REMOTE_ADDR"]; /****************************************************************************/ /* (9) DISPLAY PAGE */ /****************************************************************************/ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Career Updates</title> <link rel="stylesheet" href="css/styles_final.css" type="text/css" /> <script type="text/javascript" src="js/functions.js"></script> <script type="text/javascript" src="js/new-validate.js"></script> <script type="text/javascript" language="javascript"> <!-- PreLoad Wait - Script --> <!-- This script and more from http://www.rainbow.arch.scriptmania.com function waitPreloadPage() { //DOM if (document.getElementById){ document.getElementById('prepage').style.visibility='hidden'; }else{ if (document.layers){ //NS4 document.prepage.visibility = 'hidden'; } else { //IE4 document.all.prepage.style.visibility = 'hidden'; } } } // End --> </script> </head> <body onLoad="waitPreloadPage();"> <div id="main"> </div> <div id="wrapper"> <div id="header"> <img src="images/logo.png" style="float:left;margin-left:10px;margin-top:6px;" /> <div id="whatwhere"> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <table border='0' cellspacing='1' style='font-family:arial;' width="370"> <tr><td style='font-size:16px;color:#3d3d3d'><b>what</b></td> <td style='font-size:16px;color:#3d3d3d'><b>where</b> </td> </tr> <tr><td><input type="text" name="what" style="color:#666;"></td> <td><input type="text" name="where" style="color:#666;"></td> </tr> <tr><td valign='top' style='font-size:10px'>job title, keywords or company</td> <td valign='top' style='font-size:10px;padding:0px;margin:0px;border:0px;' > <table border='0' cellpadding='1' width='100%' style='padding:0px;margin:0px;border:0px;'> <tr><td valign='top' style='font-size:10px;padding:0px;margin:0px;border:0px;'>zip only</td> </tr> </table></td></tr> </td></tr></table> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <div style='margin-left:380px;margin-top:-40px;'> <input id='txtSearchBtn' type='image' value='Find Jobs' onclick="return ValidateWhatWhere();" src="images/btn_searchsmall.png"> </div> </form> </div> <div id="header2"> <table width='920' border='0'> <tr> <td colspan='2' align='left'> <table border='0' width='920'> <tr style='font-family:Arial;font-size:12px;font-weight:normal;color:DimGray;'> <td width='260'> Search Results: <? print($sFullName); ?> </td> <td align='right' style='font-family:Arial;font-size:12px;font-weight:normal;color:DimGray;'> </td> </tr> <tr> <td colspan='2'> </td> </tr></table> </td> </tr></table> </div> </div> <!-- MAIN CONTAINER --> <div id="container"> <!-- LEFT SIDE --> <div id="side-a"> <div style="margin-left:10px;margin-top:10px;"> <h2>Days Back</h2> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=3> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere);?>" > <input type="submit" value="" style="background-image: url(images/btn3DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=7> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn7DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=14> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn14DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=30> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn30DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value="60"> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn60DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=90> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn90DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <p> </p> <h2>Search Radius</h2> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="5"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn5Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="10"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn10Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="25"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn25Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="50" style="border-style:none;"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn50Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="100"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn100Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <p> </p> <h2>Popular</h2> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "customer-service"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="customer-service"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelCS.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "warehouse"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="warehouse"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelWH.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "data-entry"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="data-entry"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelDE.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "driver"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="driver"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelDR.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "human-resources"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="human-resources"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelHR.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "health-care"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="health-care"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelHC.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "sales-associate"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="sales-associate"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelSA.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> </div> </div> <!-- MIDDLE COLUMN --> <div id="content"> <div style="margin-left:10px;"> <br/><br/> <div id="prepage" style="position:center;margin-top:24px;font-family:Arial;font-size:16px;color:darkred;font-weight:bold;"> Please wait <?php print ($sFName); ?>... Your <?php print ("your"); ?> results are being loaded... </div> <div style="margin-top:-44px;"> <?php $searchString = "http://api.indeed.com/ads/apisearch?"; $searchString .= "q=" . $sJobTitle ."&l=" . $sZip ." &format=xml"; $searchString .= "&limit=".$iLimit ."&latlong=".$iLatLong ."&radius=".$iRadius ."&fromage=".$sDaysBack ."&sort=".$sSort; $searchString .= "&publisher=".$sPubKey."&userip=".$sIPaddress."&useragent=".$sUseragent . "&jpp=" . $iLimit; $xml = simplexml_load_file($searchString) or die ("Unable to load XML file!"); $iTotalResults = $xml->totalresults; print ("<span class='StdText'>Total Jobs: $iTotalResults</span><br/><br/>"); ?> <h2 align="left" style="margin-top: 4px;"> <?php print ("<br/>$sFName here are your $sJobTitle openings near $sZip!"); ?> </h2> <?php if ($iTotalResults > 0) { print ("<table border='0' width='700'>"); foreach ($xml->results->result as $result) { $jobkey = (string)$result->jobkey; $jobTitle = (string)$result->jobtitle; $company = (string)$result->company; $location = (string)$result->city . ", " . (string)$result->state; $postedDate = (string)$result->date; $snippet = (string)$result->snippet; $link = (string)$result->url; $sTempHref = "<a class='job' onmousedown=\"indeed_clk(this,'$jobkey')\" "; $sTempHref .= " href=" . "'" . $link . "'>"; $sTempHref .= $jobTitle . "</a>"; $TheJobs[] = array( 'jobkey' => $jobkey, 'Title' => $sTempHref, 'Company' => $company, 'Location' => $location, 'PDate' => $postedDate, 'Desc' => $snippet, 'ButtonLink' => $link ); $company = preg_replace('/[^(\x20-\x7F)]*/','', $company); $sTempHref = preg_replace('/[^(\x20-\x7F)]*/','', $sTempHref); $snippet = preg_replace('/[^(\x20-\x7F)]*/','', $snippet); print ("<tr>"); print ("<td>"); print ("$sTempHref<br/>"); print ("<span class='StdText'>$company, $location</span><br/>"); print ("<span class='StdTextLight'>$postedDate</span><br/>"); print ("<span class='StdText'>$snippet</span><br/><br/>"); } print ("</td></tr></table>"); } else { print ("<span class='StdText'>No jobs found matching thhe search criteria</span>"); } ?> </div> </div> </div> <!-- RIGHT COLUMN --> <div id="side-b"> <div style='margin-left:20px;margin:top:0px;' align='right' valign='top'> hidden content </div> </div> </div> <div id="footer"> </div> </div> </body> </html>
  8. oh sorry I thought I attached it here is a link : http://career-updates.org/jobs-new/test-email.txt
  9. Hi I have created the following job search form: http://career-updates.org/jobs-new/final-jobs2.php?num_days_back=30&fname=Damian&lname=Saez&radius=25&zip=90210&job=customer-service&what=customer-service&where=90210 If you click any of the buttons on the right side, the job search is rendereing properly. However if you enter a what and where and click find jobs in the top right area, it is not grabbing the right form data even though the url is updated to reflect the new data. I have tried everything I can think of to fix this issue, but it's just not working. Thanks.
  10. This is probably a dumb question, but the id can be any numeric value so how would I set this up?
  11. Hi - I have written code that populates a dropdown from my table.I call this code quite a few times over my app and was wondering is that somewayI can turn this in to a function? I don't know if returning 2 arrays is the right way to go.Looking for suggestions. $sQuery = "SELECT * FROM `drop-business-categories` ORDER BY `item` "; $iResult = $mysqli->query($sQuery); $iNumRows = $iResult->num_rows; $iCount = 0; if ($iNumRows > 0) { while ($iRow = $iResult->fetch_row()) { $sArrayAllCatID[$iCount] = $iRow[0]; $sArrayAllCatItem[$iCount] = $iRow[1]; $iCount++; } }
  12. Hi On my form I have a country select list and a state_prov select list. If the user selects the country "United States" or "Canada" the state_prov select list is updated accordingly. This works great on the form where the user can add a record, however on my modify form (attached), I can't seem to get the stateprov php variable I get from my table to update the state_prov select list. I renamed the file extensions to .txt to upload them. Can someone pls point me in the right direction. Thanks. functions.txt modify-code.txt
  13. Hi I am using a combination of javascript and php. I use javascript to populate the country dropdown. For example if you selected united states, there is a state_prov dropdown list which updates to display a list of states, if you select Canada, the state_prov is populated with provinces and you select Australia, the state_prov dropdown list is hidden. This works great, except when the record is being added to a table, but when I have the modify form displaying I can't set the selectedIndex of the state_prov to the stateprov value I retreive from the table. Is there some Javascript code I can use to do this? I have renamed my functions.js to functions.txt so that it can be uploaded here. modify.php functions.txt
  14. Hi I am trying to write some code that validates the user name and password from database table then set a session. http://ectpro.co/steph/login-screen.php uname: kath pwd: test I am doing something wrong, because the session var aren't saving. I am really stuck and am hoping someone can help me out with this. Thanks. Kath
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.