Sterling Job Search


/ Published in: PHP
Save to your folder(s)

This is for a particular search on a project. Just saving here for future use.


Copy this code and paste it in your HTML
  1. {doctype}
  2. <head>
  3. {embed="site/_global_head_title"}
  4. {css}
  5. </head>
  6.  
  7. <body class="home">
  8.  
  9. <div id="container">
  10.  
  11. <div id="content">
  12. <div id="content-main">
  13. <form name="frm_jobsearch" method="get" action="">
  14. <table border="0" cellspacing="0" cellpadding="4">
  15. <tr>
  16. <td class="arialsm">Specialty</td>
  17. <td>
  18. <select name="specialty" class="arialsm">
  19. <option value="Any">Any</option>
  20.  
  21. <option value="Emergency Medicine">Emergency Medicine</option>
  22. </select></td>
  23. </tr>
  24. <tr>
  25. <td class="arialsm">Profession</td>
  26. <td>
  27. <select name="profession" class="arialsm">
  28. <option value="Any">Any</option>
  29.  
  30. <option value="Doctor of Osteopathy">Doctor of Osteopathy</option>
  31.  
  32. <option value="Medical Doctor">Medical Doctor</option>
  33.  
  34. <option value="Nurse Practitioner">Nurse Practitioner</option>
  35.  
  36. <option value="Physician Assistant">Physician's Assistant</option>
  37. </select></td>
  38. </tr>
  39. <tr>
  40. <td class="arialsm">State</td>
  41. <td>
  42. <select name="state" class="arialsm">
  43. <option value="Any">Any</option>
  44.  
  45. <option value="Alabama">Alabama</option>
  46.  
  47. <option value="Arkansas">Arkansas</option>
  48.  
  49. <option value="Florida">Florida</option>
  50.  
  51. <option value="Georgia">Georgia</option>
  52.  
  53. <option value="Illinois">Illinois</option>
  54.  
  55. <option value="Louisiana">Louisiana</option>
  56.  
  57. <option value="Michigan">Michigan</option>
  58.  
  59. <option value="Ohio">Ohio</option>
  60.  
  61. <option value="Tennessee">Tennessee</option>
  62.  
  63. <option value="Virginia">Virginia</option>
  64.  
  65. <option value="Washington">Washington</option>
  66. </select></td>
  67. </tr>
  68. <tr>
  69. <td>&nbsp;</td>
  70. <td><input type="submit" value="Search" class="arialsm" /></td>
  71. </tr>
  72. <tr><td colspan="2">&nbsp;</td></tr>
  73. <tr>
  74. <td>&nbsp;</td>
  75. <td><a href="/jobs?specialty=&profession=&state=">View all jobs</a></td>
  76. </tr>
  77. </table>
  78. </form>
  79.  
  80. <?php
  81. if($_GET['specialty'] == "Any")
  82. {
  83. $specialty = 'Emergency Medicine';
  84. } else {
  85. $specialty = $_GET['specialty'];
  86. }
  87.  
  88. if($_GET['profession'] == "Any")
  89. {
  90. $profession = 'Medical Doctor|Doctor of Osteopathy|Nurse Practitioner';
  91. } else {
  92. $profession = $_GET['profession'];
  93. }
  94.  
  95.  
  96. if($_GET['state'] == "Any")
  97. {
  98. $state = 'Florida|Alabama|Michigan';
  99. } else {
  100. $state = $_GET['state'];
  101. }
  102.  
  103. ?>
  104.  
  105.  
  106.  
  107. {exp:weblog:entries weblog="jobs" limit="25" rdf="off" dynamic="off" disable="categories|member_data|pagination|trackbacks" search:specialty="<?= $specialty ?>" search:profession="<?= $profession?>" search:state="<?= $state?>"}
  108. <div class="item">
  109. <ol>
  110. <li>{title}</li>
  111. <li>{description}</li>
  112. <li>{specialty}</li>
  113. <li>{profession}</li>
  114. <li>{state}</li>
  115. </ol>
  116. <div>
  117. {/exp:weblog:entries}
  118.  
  119.  
  120. </div> <!-- close #content-main -->
  121.  
  122. </div> <!-- close #content -->
  123.  
  124. </div> <!-- close #container -->
  125.  
  126. </body>
  127.  
  128. </html>

URL: http://ngenworks.clientsection.com/projects/452958/posts/18856379/comments

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.