当前位置: 首页>>代码示例>>PHP>>正文


PHP JB_basedirpath函数代码示例

本文整理汇总了PHP中JB_basedirpath函数的典型用法代码示例。如果您正苦于以下问题:PHP JB_basedirpath函数的具体用法?PHP JB_basedirpath怎么用?PHP JB_basedirpath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了JB_basedirpath函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: define

// Copyright Jamit Software LTD 2010
/*
The Iframe is used for marking the location on the map when the form is in
editing mode.
Iframe is not used for displaying the map
*/
define('NO_HOUSE_KEEPING', true);
$dir = dirname(__FILE__);
$dir = explode(DIRECTORY_SEPARATOR, $dir);
array_pop($dir);
array_pop($dir);
array_pop($dir);
$dir = implode('/', $dir);
require $dir . '/config.php';
require_once JB_basedirpath() . 'include/classes/JBGoogleMap.php';
$GMAP = JBGoogleMap::get_instance();
$map_id = (int) $_REQUEST['map_id'];
$form_id = (int) $_REQUEST['form_id'];
if (is_numeric($_REQUEST['lat']) && is_numeric($_REQUEST['lng']) && $_REQUEST['lat'] != 0) {
    if (is_numeric($_REQUEST['z'])) {
        $zoom = (int) $_REQUEST['z'];
    } else {
        $zoom = JB_GMAP_ZOOM;
    }
    $coords = $GMAP->add_map($map_id, array('lat' => $_REQUEST['lat'], 'lng' => $_REQUEST['lng']), $zoom);
    $lat = $_REQUEST['lat'];
    $lng = $_REQUEST['lng'];
} else {
    // use the default lat and lng
    $coords = $GMAP->add_map($map_id, array('lat' => JB_GMAP_LAT, 'lng' => JB_GMAP_LNG), JB_GMAP_ZOOM);
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:30,代码来源:gmap_iframe.php

示例2: JB_template_candidates_footer

		<h3><center><?php 
        echo $label['e_thanks_payment_return'];
        ?>

		</center></h3>

		<?php 
        //process_payment_return('authorizeNet');
        $_PAYMENT_OBJECTS['authorizeNet']->process_payment_return();
        JB_template_candidates_footer();
        // Add a base tag to point to the candidates section
        $c = ob_get_contents();
        $c = preg_replace('/<HEAD>/i', '<HEAD><base href="' . JB_BASE_HTTP_PATH . JB_CANDIDATE_FOLDER . '" >', $c);
    } else {
        chdir(JB_basedirpath() . JB_EMPLOYER_FOLDER);
        // This is a clone of the employers/thanks.php page
        JB_template_employers_header();
        ?>
		<h3><center><?php 
        echo $label['e_thanks_payment_return'];
        ?>

		</center></h3>
		<?php 
        $_PAYMENT_OBJECTS['authorizeNet']->process_payment_return();
        JB_template_employers_footer();
        // Add a base tag to point to the candidates section
        $c = ob_get_contents();
        $c = preg_replace('/<HEAD>/i', '<head><base href="' . JB_BASE_HTTP_PATH . JB_EMPLOYER_FOLDER . '" >', $c);
    }
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:30,代码来源:authorizeNetSIM.php

示例3: JB_get_text_menucss_url

<?php

###########################################################################
# Copyright Jamit Software 2012, http://www.jamit.com
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
###########################################################################
?>

<link rel="stylesheet" type="text/css" href="<?php 
echo JB_get_text_menucss_url();
?>
" >

   <div id="menu1" style="display: none"></div>
<DIV style="float: right;"><?php 
echo $label["employer_menu_logged_in"];
?>
 <b><?php 
echo $_SESSION['JB_Username'];
?>
</b> | <a href="logout.php"><?php 
echo $label["employer_menu_logout"];
?>
</a></DIV>
 <?php 
require JB_basedirpath() . 'include/tabbed_menu_functions.php';
$active_button = JB_tabbed_show_menu($jb_menu);
JB_tabbed_show_sub_menu($active_button);
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:30,代码来源:text_menu.php

示例4: define

<?php

###########################################################################
# Copyright Jamit Software 2012, http://www.jamit.com
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
###########################################################################
define('NO_HOUSE_KEEPING', true);
if (function_exists('JB_basedirpath')) {
    // config.php was required
    $dir = JB_basedirpath();
} else {
    $dir = '../';
}
if (!defined('JB_SITE_NAME')) {
    require $dir . '/config.php';
}
require_once $dir . '/include/resumes.inc.php';
ini_set('max_execution_time', 100200);
$DO_SEND = '';
if (defined('JB_RESUME_ALERTS_DO_SEND')) {
    // cron
    $DO_SEND = "YES";
} else {
    // from Admin
    require dirname(__FILE__) . '/admin_common.php';
    // require Admin login
    if (JB_RESUME_ALERTS_ENABLED != 'YES') {
        echo 'Resume Alerts feature is not enabled in Admin->Main Config';
        return;
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:31,代码来源:resumealerts.php

示例5: array

- text_menu.php
- js_menu.php
*/
global $jb_menu;
$jb_menu = array();
$sub_menu1 = array(0 => array('label' => $label["c_menu_main"], 'link' => 'index.php', 'image' => ''), 1 => array('label' => $label["c_menu_membership"], 'link' => 'membership.php', 'image' => '', 'condition1' => 'JB_CANDIDATE_MEMBERSHIP_ENABLED', 'cond' => 'OR'), 2 => array('label' => $label["c_menu_pwchange"], 'link' => 'password.php', 'image' => ''), 3 => array('label' => $label["c_menu_ac_details"], 'link' => 'account.php', 'image' => ''), 4 => array('label' => $label["c_menu_select_lang"], 'link' => 'language.php', 'image' => '', 'condition1' => 'JB_CAN_LANG_ENABLED', 'cond' => 'OR'), 5 => array('label' => $label["c_menu_logout"], 'link' => 'logout.php', 'image' => ''));
$sub_menu2 = array(0 => array('label' => $label["c_menu_view"], 'link' => 'resume.php', 'image' => ''), 1 => array('label' => $label["c_menu_edit"], 'link' => 'edit.php', 'image' => ''));
$sub_menu4 = array(0 => array('label' => $label["c_menu_search"], 'link' => 'search.php', 'image' => ''), 1 => array('label' => $label["c_menu_category"], 'link' => 'browse.php', 'image' => ''), array('label' => $label["c_menu_saved"], 'link' => 'save.php', 'image' => '', 'condition1' => 'JB_SAVE_JOB_ENABLED', 'cond' => 'OR'), array('label' => $label["c_menu_apps"], 'link' => 'apps.php', 'image' => '', 'condition1' => 'JB_ONLINE_APP_ENABLED', 'cond' => 'OR'), array('label' => $label["c_menu_alerts"], 'link' => 'alerts.php', 'image' => '', 'condition1' => 'JB_JOB_ALERTS_ENABLED', 'cond' => 'OR'));
$label["c_menu_about"] = str_replace("%SITE_NAME%", JB_SITE_NAME, $label["c_menu_about"]);
$sub_menu5 = array(0 => array('label' => $label["c_menu_contents"], 'link' => 'help.php', 'image' => ''), array('label' => $label["c_menu_about"], 'link' => 'about.php', 'image' => ''));
/// Menu Buttons
$jb_menu[0]['button'] = array('label' => $label["c_menu_account"], 'link' => 'index.php', 'image' => '');
$jb_menu[0]['sub'] = $sub_menu1;
$jb_menu[1]['button'] = array('label' => $label["c_menu_resume"], 'link' => 'resume.php', 'image' => '');
$jb_menu[1]['sub'] = $sub_menu2;
$jb_menu[3]['button'] = array('label' => $label["c_menu_jobs"], 'link' => 'search.php', 'image' => '');
// postit-small.gif
$jb_menu[3]['sub'] = $sub_menu4;
$jb_menu[4]['button'] = array('label' => $label["c_menu_help"], 'link' => 'help.php', 'image' => '');
$jb_menu[4]['sub'] = $sub_menu5;
JBPLUG_do_callback('candidate_menu_init', $jb_menu);
if (!defined('JB_CANDIDATE_MENU_TYPE')) {
    define('JB_CANDIDATE_MENU_TYPE', 'JS');
}
if (JB_CANDIDATE_MENU_TYPE == 'JS') {
    require JB_basedirpath() . JB_CANDIDATE_FOLDER . "js_menu.php";
} elseif (JB_CANDIDATE_MENU_TYPE == 'TXT') {
    require JB_basedirpath() . JB_CANDIDATE_FOLDER . "/text_menu.php";
} else {
    require JB_basedirpath() . JB_CANDIDATE_FOLDER . "/js_menu.php";
}
开发者ID:vinothtimes,项目名称:phpdoc,代码行数:31,代码来源:candidate-menu.php

示例6: JB_do_upgrade


//.........这里部分代码省略.........
            JB_mysql_query($sql);
        }
        // member completed
        $sql = "INSERT INTO `email_templates` (`EmailID`, `EmailText`, `EmailFromAddress`, `EmailSubject`, `EmailFromName`, `sub_template`) VALUES (130, 'Dear  %LNAME%, %FNAME%\r\n\r\nThis email is sent to notify you that your subscription to %SITE_NAME% has expired.\r\n\r\nWe thank you for your patronage during your subscription time, and we hope\r\nthat we can continue to serve you as our subscriber in the future.\r\n\r\n\r\n========================\r\nORDER DETAILS\r\n=========================\r\nOrder ID: #%INVOICE_CODE%\r\nSubscription Name: %ITEM_NAME%\r\nSubscription Months: %SUB_DURATION%\r\nStart Date: %SUB_START%\r\nEnd Date: %SUB_END%\r\nPrice: %INVOICE_AMOUNT%\r\nStatus: Expired\r\nPayment Method: %PAYMENT_METHOD%\r\n\r\n--------------------------\r\n\r\nThank you for using %SITE_NAME%! \r\n\r\nYou may view your subscription order history at any time.\r\nJust log in to your %SITE_NAME%, and go to ''Account'' -> ''Subscription''.\r\n\r\n\r\n\r\n%SITE_NAME% team.\r\n%SITE_URL%\r\n\r\nNote: This is an automated email.', 'example@example.com', 'Subscription Expired', 'Jamit Demo', '')";
        if (!JB_template_exists(130)) {
            JB_mysql_query($sql);
        }
        // sub expired
        $sql = "INSERT INTO `email_templates` ( `EmailText` , `EmailFromAddress` , `EmailFromName` , `EmailSubject` , `EmailID` , `sub_template` )VALUES ('%APP_LETTER% \r\n\r\n----------------------------------- \r\nThis email was sent from %SITE_NAME% %BASE_HTTP_PATH%\r\nOnline Resume Link: \r\n%RESUME_DB_LINK%\r\n', '', '', '', '12', '');";
        if (!JB_template_exists(12)) {
            JB_mysql_query($sql);
        }
        // application
        $sql = "INSERT INTO `email_templates` (`EmailID`, `EmailText`, `EmailFromAddress`, `EmailSubject`, `EmailFromName`, `sub_template`) VALUES (11, '%MESSAGE%\r\n\r\n\r\n\r\n\r\n------------------------\r\n%SITE_URL%\r\n\r\nThis message was sent by somebody using the \r\nweb-email service provided by %SITE_NAME%.\r\n\r\nName: %EMPLOYER_NAME%\r\nSender\\'s User ID: %USER_ID%\r\nSender IP: %SENDER_IP%\r\n', 'example@example.com', '', 'Jamit Demo', '');";
        if (!JB_template_exists(11)) {
            JB_mysql_query($sql);
        }
        // employer to candidate
        $sql = "INSERT INTO `email_templates` (`EmailID`, `EmailText`, `EmailFromAddress`, `EmailSubject`, `EmailFromName`, `sub_template`) VALUES (44, 'Hello %EMP_NAME%\r\n\r\n%CAN_NAME% has granted you access to their online resume on %SITE_NAME%!\r\n\r\nTo view this resume, please see this link:\r\n\r\nResume link: %RESUME_DB_LINK%\r\n\r\nThanks,\r\n\r\n%SITE_NAME%\r\n%SITE_URL%\r\n-------------\r\n\r\n', '" . JB_SITE_CONTACT_EMAIL . "', '%CAN_NAME% granted you access to their resume on %SITE_NAME% ', '" . JB_SITE_NAME . "', '');";
        if (!JB_template_exists(44)) {
            JB_mysql_query($sql);
        }
        // employer to candidate
        if ($sql != '') {
            JB_format_email_translation_table();
        }
        // fix the profile tag
        $sql = "UPDATE form_fields SET template_tag = 'PROFILE_BNAME' WHERE template_tag='PROFILE_COL2' ";
        JB_mysql_query($sql);
        $sql = "UPDATE form_lists SET template_tag = 'PROFILE_BNAME' WHERE template_tag='PROFILE_COL2' ";
        JB_mysql_query($sql);
        // replace config.php
        if (mysql_affected_rows($jb_mysql_link) > 0) {
            $filename = JB_basedirpath() . 'config.php';
            $handle = fopen($filename, "r");
            $contents = fread($handle, filesize($filename));
            fclose($handle);
            $contents = str_replace('s:12:"PROFILE_COL2', 's:13:"PROFILE_BNAME', $contents);
            $handle = fopen($filename, 'w');
            fwrite($handle, $contents, strlen($contents));
            fclose($handle);
        }
        if (!does_field_exist("lang", "theme")) {
            $sql = "ALTER TABLE `lang` ADD `theme` VARCHAR(30) NULL default '" . JB_THEME . "'";
            //echo $sql." flag $flag";
            if ($flag) {
                JB_mysql_query($sql) or die($sql . mysql_error());
            }
            $upgrade_needed = true;
        }
        if (!does_field_exist("requests", "deleted")) {
            $sql = "ALTER TABLE `requests`  ADD `deleted` SET( 'Y', 'N' ) NOT NULL DEFAULT 'N' ";
            //echo $sql." flag $flag";
            if ($flag) {
                JB_mysql_query($sql) or die($sql . mysql_error());
            }
            $upgrade_needed = true;
        }
        if (!does_field_exist("xml_import_feeds", "feed_id")) {
            $sql = "CREATE TABLE `xml_import_feeds` (\n\t\t\t\t  `feed_id` int(11) NOT NULL auto_increment,\n\t\t\t\t  `feed_metadata` text NOT NULL,\n\t\t\t\t  `feed_name` varchar(255) NOT NULL,\n\t\t\t\t  `description` varchar(255) NOT NULL,\n\t\t\t\t  `date` date NOT NULL,\n\t\t\t\t  `xml_sample` text NOT NULL,\n\t\t\t\t  `feed_key` varchar(255) NOT NULL,\n\t\t\t\t  `ip_allow` text NOT NULL,\n\t\t\t\t  `feed_url` varchar(255) NOT NULL,\n\t\t\t\t  `feed_filename` varchar(255) NOT NULL,\n\t\t\t\t  `ftp_user` varchar(255) NOT NULL,\n\t\t\t\t  `ftp_pass` varchar(255) NOT NULL,\n\t\t\t\t  `ftp_filename` varchar(255) NOT NULL,\n\t\t\t\t  `ftp_host` varchar(255) NOT NULL,\n\t\t\t\t  `status` varchar(10) NOT NULL,\n\t\t\t\t  `pickup_method` varchar(5) NOT NULL,\n\t\t\t\t  `cron` set('Y','N') NOT NULL,\n\t\t\t\t  PRIMARY KEY  (`feed_id`)\n\t\t\t\t) ENGINE=MyISAM";
            if ($flag) {
                JB_mysql_query($sql) or die($sql . mysql_error());
            }
            $upgrade_needed = true;
            // change post_id to be auto-increment
            $sql = " ALTER TABLE `posts_table` CHANGE `post_id` `post_id` INT( 11 ) NOT NULL AUTO_INCREMENT  ";
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:67,代码来源:upgrade.php

示例7: log_entry

 function log_entry($line)
 {
     $line = $date = date("D, j M Y H:i:s O") . ' - ' . $line . "\n";
     $s = md5(JB_SITE_NAME);
     if (function_exists('JB_get_cache_dir')) {
         $cache_dir = JB_get_cache_dir();
     } else {
         $cache_dir = JB_basedirpath() . 'cache/';
     }
     $file_name = $cache_dir . 'import_log_' . $s . '.txt';
     if (file_exists($file_name)) {
         if (time() - filemtime($file_name) > time() + 60 * 60) {
             // older than 24 hrs?
             $open_mode = 'wb';
             // overwrite the file
             $line .= date("D, j M Y H:i:s O") . ' - ' . "Cleared the log\n" . $line;
         } else {
             $open_mode = 'ab';
         }
     } else {
         $open_mode = 'wb';
     }
     $fp = fopen($file_name, $open_mode);
     fputs($fp, $line);
     fclose($fp);
     if ($this->verbose) {
         echo htmlentities($line);
         flush();
         ob_flush();
     }
 }
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:31,代码来源:xml_import_parsers.php

示例8: jb_main_config_form


//.........这里部分代码省略.........
    ?>
"></td>
		</tr>
		 <tr>
		 <?php 
    if (JB_ADMIN_PASSWORD == 'JB_ADMIN_PASSWORD') {
        $JB_ADMIN_PASSWORD = 'ok';
    } else {
        $JB_ADMIN_PASSWORD = JB_ADMIN_PASSWORD;
    }
    if (JB_DEMO_MODE == 'YES') {
        $JB_ADMIN_PASSWORD = '********';
    }
    ?>
		  <td class="config_form_label">Administrator's Password</td>
		  <td class="config_form_field">
		  <input type="password" name="admin_password" size="49" value="<?php 
    echo htmlentities($JB_ADMIN_PASSWORD);
    ?>
"></td>
		</tr>
	  </table>
	  <?php 
    $host = $_SERVER['SERVER_NAME'];
    // hostname
    $http_url = $_SERVER['PHP_SELF'];
    // eg /ojo/admin/edit_config.php
    $http_url = explode("/", $http_url);
    array_pop($http_url);
    // get rid of filename
    array_pop($http_url);
    // get rid of /admin
    $http_url = implode("/", $http_url);
    $file_path = JB_basedirpath();
    if (JB_DEMO_MODE == 'YES') {
        $file_path = '[DEMO MODE]';
    }
    ?>
	  <p>&nbsp;</p>
	  <a name="paths"></a>
	  <table cellpadding="5" cellspacing="2" class="config_form">
		<tr>
		  <td colspan="2" class="config_form_heading">
		  Paths and Locations
		  </td>
		</tr>
		<tr>
		  <td width="20%" class="config_form_label">Board's HTTP URL (address)</td>
		  <td class="config_form_field">
		  <input type="text" name="base_http_path" size="49" value="<?php 
    echo htmlentities(str_replace('https', 'http', JB_BASE_HTTP_PATH));
    ?>
"><br>Suggested: <b>http://<?php 
    echo $host . $http_url . "/";
    ?>
</b></td>
		</tr>
	   
		 <tr>
		  <td class="config_form_label">Candidate's folder name</td>
		  <td class="config_form_field">
		  <input type="text" name="candidate_folder" size="49" value="<?php 
    echo htmlentities(JB_CANDIDATE_FOLDER);
    ?>
" ><br>(eg. myjobs/ - If you change the default name, please remember to rename this directory using FTP or the command line)</td>
		</tr>
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:67,代码来源:edit_config.php

示例9: JBXML_generate_xml_feed

function JBXML_generate_xml_feed($feed_id)
{
    if (!is_numeric($feed_id)) {
        return;
    }
    $offset = 0;
    if (isset($_REQUEST['offset'])) {
        $offset = (int) $_REQUEST['offset'];
    }
    $sql = "SELECT * from xml_export_feeds WHERE feed_id='" . jb_escape_sql($feed_id) . "' ";
    $result = JB_mysql_query($sql);
    $feed_row = mysql_fetch_array($result, MYSQL_ASSOC);
    if ($feed_row['publish_mode'] == 'PRI') {
        // private mode
        if ($feed_row['feed_key'] != $_REQUEST['k']) {
            die('Invalid Key. Please contact ' . JB_SITE_CONTACT_EMAIL);
        }
    }
    $hosts = array();
    $hosts = explode(',', $feed_row['hosts_allow']);
    $allowed = false;
    if (sizeof($hosts) > 0) {
        foreach ($hosts as $host) {
            if (strtoupper($host) == 'ALL') {
                // all hosts
                $allowed = true;
            }
            if (strtolower($host) == 'localhost' && $_SERVER['REMOTE_ADDR'] == '127.0.0.1') {
                $allowed = true;
            }
            if ($host == $_SERVER['REMOTE_ADDR']) {
                $allowed = true;
            }
        }
        if (!$allowed) {
            die('Access is restricted form your IP. Please contact ' . JB_SITE_CONTACT_EMAIL);
        }
    }
    $feed_row['field_settings'] = unserialize($feed_row['field_settings']);
    $feed_row['search_settings'] = unserialize($feed_row['search_settings']);
    // build the search query up...
    if (is_array($feed_row['search_settings'])) {
        foreach ($feed_row['search_settings'] as $key => $val) {
            $_SEARCH_INPUT[$key] = $val;
        }
        $_SEARCH_INPUT['action'] = 'search';
        global $post_tag_to_search;
        global $tag_to_search;
        $where_sql = JB_generate_search_sql($feed_row['form_id'], $_SEARCH_INPUT);
    }
    if ($feed_row['max_records'] > 0) {
        $limit = "LIMIT {$offset}, " . jb_escape_sql($feed_row['max_records']);
    }
    switch ($feed_row['form_id']) {
        case 1:
            if ($feed_row['include_imported'] == 'Y') {
                if ($where_sql) {
                    $where_sql = ' AND ' . $where_sql;
                }
                $sql = "SELECT * FROM posts_table WHERE `expired`='N' AND `approved`='Y' {$where_sql} ORDER BY `post_date` DESC {$limit} ";
            } else {
                $sql = "SELECT * FROM posts_table WHERE `expired`='N' AND `approved`='Y' AND `guid`='' {$where_sql} ORDER BY `post_date` DESC {$limit} ";
            }
            break;
        case 2:
            break;
        case 3:
            break;
        case 4:
            break;
        case 5:
            break;
    }
    $records = JB_mysql_query($sql);
    // Gzip compress the output, if supported by PHP & the browser
    //if (function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')) {
    //ob_start("ob_gzhandler");
    //} else {
    //ob_start();
    //}
    header('Content-type: application/xml; charset=UTF-8');
    if ($_REQUEST['d'] != '') {
        // download?
        header('Content-Disposition: attachment; filename="feed-' . htmlentities($feed_id) . '.xml"');
    }
    // check to see if we have this feed in the cache
    if (function_exists('JB_get_cache_dir')) {
        $cache_dir = JB_get_cache_dir();
    } else {
        $cache_dir = JB_basedirpath() . 'cache/';
    }
    if (is_dir($cache_dir)) {
        if ($dh = opendir($cache_dir)) {
            while (($file = readdir($dh)) !== false) {
                if (filetype($cache_dir . $file) == 'file' && strpos($file, '.xml') !== false) {
                    $stats = stat($cache_dir . $file);
                    if ($stats['mtime'] + 3600 < time()) {
                        // has 1 hour elapsed? (3600 sec)
                        unlink($cache_dir . $file);
                    }
//.........这里部分代码省略.........
开发者ID:vinothtimes,项目名称:phpdoc,代码行数:101,代码来源:xml_feed_functions.php

示例10: dirname

<?php

###########################################################################
# Copyright Jamit Software 2012, http://www.jamit.com
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
###########################################################################
require "../config.php";
require dirname(__FILE__) . "/admin_common.php";
$PAYMENT_PATH = JB_basedirpath() . '/payment/';
include $PAYMENT_PATH . 'payment_manager.php';
JB_admin_header('Admin -> Payment Modules');
if (!JB_list_avalable_payments()) {
    echo '<font color="maroon"><b>Reminder: Please ensure that at least one payment method is enabled so that the traffic light icon goes green! :)</b></font>';
}
JB_admin_footer();
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:17,代码来源:payment.php

示例11: dirname

<?php

###########################################################################
# Copyright Jamit Software 2012, http://www.jamit.com
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
###########################################################################
require "../config.php";
require dirname(__FILE__) . "/admin_common.php";
require_once JB_basedirpath() . "include/resumes.inc.php";
JB_admin_header('Admin -> Language');
$ListMarkup =& JB_get_ListMarkupObject('JBCanListMarkup');
$CandidateForm =& JB_get_DynamicFormObject(5);
?>
<b>[CANDIDATES]</b> <span style="background-color: <?php 
if ($_REQUEST['show'] != '') {
    echo '#F2F2F2';
} else {
    echo "#FFFFCC";
}
?>
; border-style:outset; padding:5px; "><a href="candidates.php">List Candidates</a></span>
<span style="background-color: <?php 
if ($_REQUEST['show'] == 'NA') {
    echo '#FFFFCC';
} else {
    echo "#F2F2F2";
}
?>
; border-style:outset; padding: 5px;"><a href="candidates.php?show=NA">Non-Validated Candidates</a></span>
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:31,代码来源:candidates.php

示例12: JB_GoogleCheckoutAPIcall


//.........这里部分代码省略.........
							<email-delivery>false</email-delivery>
						</digital-content>
						
						<quantity>1</quantity>
						
					</item>
				</items>
			</shopping-cart>
			<checkout-flow-support>
				<merchant-checkout-flow-support>
					<continue-shopping-url>' . htmlspecialchars($continue_shopping_url) . '</continue-shopping-url>
					<edit-cart-url>' . htmlspecialchars($edit_cart_url) . '</edit-cart-url>
				</merchant-checkout-flow-support>
			</checkout-flow-support>
			</checkout-shopping-cart>';
            /*
            
            			A typical response is:
            
            			<checkout-redirect xmlns="http://checkout.google.com/schema/2" serial-number="6e6ed5d3-fdb9-4f49-8d9f-9e8b190ece55">
            				<redirect-url>https://sandbox.google.com/checkout/view/buy?o=shoppingcart&amp;shoppingcart=110689039015614</redirect-url>
            			</checkout-redirect>
            
            			Send the user to redirect-url
            */
            break;
        case 'notification-history-request':
            $url = $report_url;
            /*
            Notification types:
            authorization-amount
            			charge-amount
            			chargeback-amount
            			new-order
            			order-state-change
            			refund-amount
            			risk-information
            */
            $req = '<?xml version="1.0" encoding="UTF-8"?>
					<notification-history-request xmlns="http://checkout.google.com/schema/2">
					<serial-number>' . $args['serial-number'] . '</serial-number>
					</notification-history-request>';
            if (isset($args['google-order-number'])) {
                $req = '<?xml version="1.0" encoding="UTF-8"?>
					<notification-history-request xmlns="http://checkout.google.com/schema/2">
						<order-numbers>
							<google-order-number>' . $args['google-order-number'] . '</google-order-number>
						</order-numbers>
						<notification-types>
							<notification-type>' . $args['notification-type'] . '</notification-type>
						</notification-types>
					</notification-history-request>';
            }
            break;
        case 'charge-and-ship-order':
            $url = $request_url;
            $req = '<?xml version="1.0" encoding="UTF-8"?>
					<charge-and-ship-order xmlns="http://checkout.google.com/schema/2" google-order-number="' . $args['google-order-number'] . '">
					</charge-and-ship-order>';
    }
    $headers = array();
    $headers[] = "Authorization: Basic " . base64_encode(GOOGLE_CHECKOUT_MERCHANT_ID . ':' . GOOGLE_CHECKOUT_MERCHANT_KEY);
    $headers[] = "Content-Type: application/xml; charset=UTF-8";
    $headers[] = "Accept: application/xml; charset=UTF-8";
    $headers[] = "User-Agent: Jamit Job Board";
    $session = curl_init($url);
    curl_setopt($session, CURLOPT_POST, true);
    curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($session, CURLOPT_POSTFIELDS, $req);
    curl_setopt($session, CURLOPT_HEADER, true);
    curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($session, CURLOPT_COOKIESESSION, TRUE);
    $hash = substr(md5(JB_ADMIN_PASSWORD . GOOGLE_CHECKOUT_MERCHANT_KEY), 0, 10);
    curl_setopt($session, CURLOPT_COOKIEFILE, JB_basedirpath() . 'cache/' . $hash . 'cookiefile.txt');
    curl_setopt($session, CURLOPT_COOKIEJAR, JB_basedirpath() . 'cache/' . $hash . 'jarfile.txt');
    //if(!empty($this->certPath) && file_exists($this->certPath)) {
    //	curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);
    //	curl_setopt($session, CURLOPT_CAINFO, $this->certPath);
    //}
    //else {
    //	curl_setopt($session, CURLOPT_SSL_VERIFYPEER, false);
    //}
    curl_setopt($session, CURLOPT_SSL_VERIFYPEER, false);
    //if(is_array($this->proxy) && count($this->proxy)) {
    //	curl_setopt($session, CURLOPT_PROXY,
    //				$this->proxy['host'] . ":" . $this->proxy['port']);
    //}
    if ($timeout != false) {
        curl_setopt($session, CURLOPT_TIMEOUT, $timeout);
    }
    // Do the POST and then close the session
    $response = curl_exec($session);
    curl_close($session);
    $pos = strpos($response, "\r\n\r\n");
    $response = substr($response, $pos);
    //jb_googc_log_entry("Request:".$req);
    //jb_googc_log_entry("Response:".$response);
    $xml = new SimpleXMLElement(trim($response));
    return $xml;
}
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:101,代码来源:googleCheckout.php

示例13: array

$sub_menu2 = array(0 => array('label' => $label["employer_menu_view_profile"], 'link' => 'profile.php', 'image' => ''), 1 => array('label' => $label["employer_menu_edit_profile"], 'link' => 'edit.php', 'image' => ''));
$sub_menu3 = array(0 => array('label' => $label["employer_menu_browse_resumes"], 'link' => 'search.php', 'image' => ''), 4 => array('label' => $label["employer_menu_saved_resumes"], 'link' => 'saved.php', 'image' => ''), 1 => array('label' => $label["employer_menu_resume_alerts"], 'link' => 'alerts.php', 'image' => '', 'condition1' => 'JB_RESUME_ALERTS_ENABLED', 'cond' => 'OR'), 2 => array('label' => $label["employer_menu_subscr"], 'link' => 'subscriptions.php', 'image' => '', 'condition1' => 'JB_SUBSCRIPTION_FEE_ENABLED', 'cond' => 'OR'), 3 => array('label' => '', 'link' => 'request.php', 'image' => '', 'condition1' => '', 'cond' => 'OR'));
$sub_menu4 = array(0 => array('label' => $label["employer_menu_job_post_manager"], 'link' => 'manager.php', 'image' => JB_THEME_URL . 'images/manager.gif'), 1 => array('label' => $label["employer_menu_post_a_new_job"], 'link' => 'post.php', 'image' => JB_THEME_URL . 'images/postit.gif'), 2 => array('label' => $label["employer_menu_prm_post"], 'link' => 'post.php?type=premium', 'image' => JB_THEME_URL . 'images/premiumpostit.gif', 'condition1' => 'JB_PREMIUM_POSTING_FEE_ENABLED', 'cond' => 'OR'), 3 => array('label' => $label["employer_menu_credits"], 'link' => 'credits.php', 'image' => JB_THEME_URL . 'images/coins.gif', 'condition1' => 'JB_POSTING_FEE_ENABLED', 'condition2' => 'JB_PREMIUM_POSTING_FEE_ENABLED', 'cond' => 'OR'));
$sub_menu5 = array(0 => array('label' => $label["employer_menu_app_man"], 'link' => 'apps.php', 'image' => ''));
$sub_menu6 = array(0 => array('label' => $label["employer_menu_contents_and_index"], 'link' => 'help.php', 'image' => ''));
/// Menu Buttons
// Need to include the JB_THEME_URL.'images/vf1x20.gif pic to keep buttons aligned..
$jb_menu[0]['button'] = array('label' => $label["employer_menu_account"], 'link' => 'index.php', 'image' => JB_THEME_URL . 'images/vf1x20.gif');
$jb_menu[0]['sub'] = $sub_menu1;
$jb_menu[1]['button'] = array('label' => $label["employer_menu_profile"], 'link' => 'profile.php', 'image' => JB_THEME_URL . 'images/vf1x20.gif');
$jb_menu[1]['sub'] = $sub_menu2;
$jb_menu[2]['button'] = array('label' => $label["employer_menu_resumes"], 'link' => 'search.php', 'image' => JB_THEME_URL . 'images/vf1x20.gif');
$jb_menu[2]['sub'] = $sub_menu3;
$jb_menu[3]['button'] = array('label' => $label["employer_menu_posts"], 'link' => 'manager.php', 'image' => JB_THEME_URL . 'images/postit-small.gif');
// postit-small.gif
$jb_menu[3]['sub'] = $sub_menu4;
$jb_menu[4]['button'] = array('label' => $label["employer_menu_app_man"], 'link' => 'apps.php', 'image' => JB_THEME_URL . 'images/vf1x20.gif');
$jb_menu[4]['sub'] = $sub_menu5;
$jb_menu[5]['button'] = array('label' => $label["employer_menu_help"], 'link' => 'help.php', 'image' => JB_THEME_URL . 'images/vf1x20.gif');
$jb_menu[5]['sub'] = $sub_menu6;
JBPLUG_do_callback('employer_menu_init', $jb_menu);
if (!defined('JB_EMPLOYER_MENU_TYPE')) {
    define('JB_EMPLOYER_MENU_TYPE', 'JS');
}
if (JB_EMPLOYER_MENU_TYPE == 'JS') {
    require JB_basedirpath() . JB_EMPLOYER_FOLDER . "js_menu.php";
} elseif (JB_EMPLOYER_MENU_TYPE == 'TXT') {
    require JB_basedirpath() . JB_EMPLOYER_FOLDER . "/text_menu.php";
} else {
    require JB_basedirpath() . JB_EMPLOYER_FOLDER . "/js_menu.php";
}
开发者ID:vinothtimes1,项目名称:docker,代码行数:31,代码来源:employer-menu.php

示例14: editor_field

 function editor_field()
 {
     global $FCK_LANG_FILES, $JBMarkup;
     $lang = str_replace('.js', '', $FCK_LANG_FILES[$_SESSION['LANG']]);
     if ($this->field_row['FCOMMENT'] != '') {
         echo $this->field_row['FCOMMENT'] . "<br>";
     }
     // See include/lib/ckeditor/config.js for configuration options
     require_once JB_basedirpath() . "include/lib/ckeditor/ckeditor.php";
     $CKEditor = new CKEditor();
     $CKEditor->initialized = true;
     $CKEditor->basePath = jb_get_CK_js_base(true);
     $config = array('toolbar' => 'Basic', 'docType' => $JBMarkup->doc_type, 'width' => '99%', 'height' => $this->field_row['field_height'] * 15, 'language' => $lang);
     $events['instanceReady'] = 'function (ev) { ev.editor.dataProcessor.writer.selfClosingEnd = \'>\'; }';
     // turn off XHTML generation
     $val = $this->get_data_value($this->field_row['field_id']);
     $CKEditor->editor($this->field_row['field_id'], $val, $config, $events);
 }
开发者ID:vinothtimes,项目名称:phpdoc,代码行数:18,代码来源:JBDynamicFormMarkup.php

示例15: JB_do_cron_job

function JB_do_cron_job()
{
    if (is_numeric(JB_CRON_LIMIT)) {
        // check load averge. Do not do cron if load avg is larger than the limit
        JB_exec("w", $out);
        preg_match('#load average: (\\d+\\.\\d+)#', $out[0], $m);
        $load_av = $m[1];
        if ($load_av > JB_CRON_LIMIT) {
            return false;
        }
    }
    $unix_time = time();
    $dir = JB_basedirpath();
    // process the email queue
    JB_process_mail_queue(JB_EMAILS_PER_BATCH);
    // scan inbox
    if (!function_exists('JB_monitor_mail_box')) {
        require_once $dir . "include/mail_monitor_functions.php";
    }
    JB_load_monitor_constants();
    if (MON_ENABLED == 'YES') {
        JB_monitor_mail_box();
    }
    // get the time of last HOURLY run
    $sql = "SELECT * FROM `jb_variables` where `key` = 'LAST_HOURLY_RUN' ";
    $result = @JB_mysql_query($sql) or $DB_ERROR = mysql_error();
    $t_row = @mysql_fetch_array($result, MYSQL_ASSOC);
    JBPLUG_do_callback('do_cron_job', $A = false);
    // queue email alerts
    if ($unix_time > $t_row['val'] + 3600) {
        // did 1 hour elapse since last run? 3600
        if (JB_JOB_ALERTS_ENABLED == 'YES') {
            // need to init jobs tag_to_field
            define('JB_JOB_ALERTS_DO_SEND', true);
            require $dir . 'admin/jobalerts.php';
        }
        if (JB_RESUME_ALERTS_ENABLED == 'YES') {
            // need to init resume tag_to_field
            define('JB_RESUME_ALERTS_DO_SEND', true);
            require $dir . 'admin/resumealerts.php';
        }
        JB_update_employer_subscriptions();
        JB_update_memberships();
        // update timestamp
        $sql = "REPLACE INTO jb_variables (`key`, `val`) VALUES ('LAST_HOURLY_RUN', '{$unix_time}')  ";
        $result = @JB_mysql_query($sql) or $DB_ERROR = mysql_error();
        if (!function_exists('JB_search_category_tree_for_posts')) {
            require_once $dir . "include/posts.inc.php";
        }
        JB_expire_posts('PREMIUM');
        JB_expire_posts('STANDARD');
        JB_cache_del_keys_for_all_cats(1);
        JB_cache_del_keys_for_all_cats(2);
        JB_cache_del_keys_for_all_cats(3);
        JB_cache_del_keys_for_all_cats(4);
        JB_cache_del_keys_for_all_cats(5);
        //
        JB_update_post_count();
        JB_update_resume_count();
        JB_update_profile_count();
        JB_update_employer_count();
        JB_update_user_count();
        if (EMAIL_URL_SHORTEN == 'YES') {
            JB_expire_short_URLs();
        }
        // run the import tool
        JB_process_xml_import();
        JBPLUG_do_callback('do_cron_hourly', $A = false);
    }
}
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:70,代码来源:functions.php


注:本文中的JB_basedirpath函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。