Example #1
0
    echo " checked ";
}
?>
 >Sort by names, eg. Australia, Belgium, Canada</font></td>
    </tr>
	<tr>
      <td bgcolor="#e6f2ea" width="100%" colspan="2"><font face="Verdana" size="1"> 
       <input type="submit" name="set_order_by" value="Submit"></font></td>
     
    </tr>
 </table>
 </form>
<?php 
if (!$_REQUEST['field_id']) {
    ?>
  <h3>Edit Codes</h3>
  Codes are used for Radio Buttons, Drop-downs & Multiple Select fields. Here you can edit the codes for each of the forms.
  Select the code group that you would like to edit:<p><?php 
    echo "<b>Posting Form:</b>";
    list_code_groups(1);
    echo "<b>Resume Form:</b>";
    list_code_groups(2);
    echo "<b>Profile Form:</b>";
    list_code_groups(3);
    echo "<b>Employer's Form:</b>";
    list_code_groups(4);
    echo "<b>Candidate's Form:</b>";
    list_code_groups(5);
    jbplug_do_callback('admin_list_codes', $A = false);
}
JB_admin_footer();
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the Million Dollar Script.  If not, see <http://www.gnu.org/licenses/>.
*/
ini_set('max_execution_time', 10000);
require '../include/code_functions.php';
require '../config.php';
require "admin_common.php";
$field_id = $_REQUEST['field_id'];
$code = $_REQUEST['code'];
$description = $_REQUEST['description'];
$modify = $_REQUEST['modify'];
if (!$_REQUEST['field_id']) {
    echo "Select the code group that you would like to edit:<p>";
    echo "Ad Form:";
    list_code_groups(1);
    die;
}
function can_delete_code($field_id, $code)
{
    $sql = "SHOW TABLES";
    $tables = mysql_query($sql);
    $tables = array('ads');
    foreach ($tables as $table) {
        $sql = "SHOW COLUMNS FROM " . $table;
        $cols = mysql_query($sql);
        while ($c_row = mysql_fetch_row($cols)) {
            if ($c_row[0] == $field_id) {
                $sql = "SELECT * FROM " . $table . " WHERE `{$field_id}` like '%{$code}%' ";
                $result = mysql_query($sql);
                if (mysql_num_rows($result) == 0) {