Jamit Software Forum
Welcome, Guest. Please login or register.
January 21, 2018, 10:26:49 am

Login with username, password and session length
Search:     Advanced search
May 27th, 2009 - Jamit Software Launches the forum today!
3,080 Posts in 791 Topics by 1,398,822 Members
Latest Member: GastonCory
* Home Help Search Login Register
+  Jamit Software Forum
|-+  Jamit Job Board Customers
| |-+  Configuration
| | |-+  Auto-approving some adverts
« previous next »
Pages: [1] Print
Author Topic: Auto-approving some adverts  (Read 2102 times)
cellularnews
Jammers
Jr. Member
*
Posts: 15


« on: February 11, 2012, 06:18:34 pm »

I wanted to be able to auto-approve some advertisers so made the following small modification.

This will auto-approve job adverts that are submitted by an advertiser that currently has a live job advert.

/include/posts.inc.php

in
Code:
function JB_insert_post_data($insert_mode='EMPLOYER') {

Just above
Code:
if ($_REQUEST['app_type']==false) {

add the following code:

Code:
$sql="SELECT COUNT(*) AS livejobs FROM posts_table WHERE approved='Y' AND expired='N' AND user_id=".$user_id;
$result = JB_mysql_query ($sql) or die(mysql_error().$sql);
$row = mysql_fetch_array($result, MYSQL_ASSOC);
if ($row[livejobs]>0) { $approved = 'Y'; }

Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.194 seconds with 17 queries.