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


PHP JBPLUG_do_callback函数代码示例

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


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

示例1: admin_list_controls

 function admin_list_controls()
 {
     global $label;
     $this->controls_open();
     JBPLUG_do_callback('app_admin_list_controls', $this);
     // a plugin can be attached to add extra buttons
     $this->list_delete_button('Delete', "Delete what's selected, are you sure?");
     $this->controls_close();
 }
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:9,代码来源:JBAppListMarkup.php

示例2: jb_get_mime_type

function jb_get_mime_type($ext)
{
    $mime_types = array("323" => "text/h323", "acx" => "application/internet-property-stream", "ai" => "application/postscript", "aif" => "audio/x-aiff", "aifc" => "audio/x-aiff", "aiff" => "audio/x-aiff", "asf" => "video/x-ms-asf", "asr" => "video/x-ms-asf", "asx" => "video/x-ms-asf", "au" => "audio/basic", "avi" => "video/x-msvideo", "axs" => "application/olescript", "bas" => "text/plain", "bcpio" => "application/x-bcpio", "bin" => "application/octet-stream", "bmp" => "image/bmp", "c" => "text/plain", "cat" => "application/vnd.ms-pkiseccat", "cdf" => "application/x-cdf", "cer" => "application/x-x509-ca-cert", "class" => "application/octet-stream", "clp" => "application/x-msclip", "cmx" => "image/x-cmx", "cod" => "image/cis-cod", "cpio" => "application/x-cpio", "crd" => "application/x-mscardfile", "crl" => "application/pkix-crl", "crt" => "application/x-x509-ca-cert", "csh" => "application/x-csh", "css" => "text/css", "dcr" => "application/x-director", "der" => "application/x-x509-ca-cert", "dir" => "application/x-director", "dll" => "application/x-msdownload", "dms" => "application/octet-stream", "doc" => "application/msword", "dot" => "application/msword", "docx" => "application/msword", "dotx" => "application/msword", "xls" => "application/msword", "xlsx" => "application/msword", "dvi" => "application/x-dvi", "dxr" => "application/x-director", "eps" => "application/postscript", "etx" => "text/x-setext", "evy" => "application/envoy", "exe" => "application/octet-stream", "fif" => "application/fractals", "flr" => "x-world/x-vrml", "gif" => "image/gif", "gtar" => "application/x-gtar", "gz" => "application/x-gzip", "h" => "text/plain", "hdf" => "application/x-hdf", "hlp" => "application/winhlp", "hqx" => "application/mac-binhex40", "hta" => "application/hta", "htc" => "text/x-component", "htm" => "text/html", "html" => "text/html", "htt" => "text/webviewhtml", "ico" => "image/x-icon", "ief" => "image/ief", "iii" => "application/x-iphone", "ins" => "application/x-internet-signup", "isp" => "application/x-internet-signup", "jfif" => "image/pipeg", "jpe" => "image/jpeg", "jpeg" => "image/jpeg", "jpg" => "image/jpeg", "js" => "application/x-javascript", "latex" => "application/x-latex", "lha" => "application/octet-stream", "lsf" => "video/x-la-asf", "lsx" => "video/x-la-asf", "lzh" => "application/octet-stream", "m13" => "application/x-msmediaview", "m14" => "application/x-msmediaview", "m3u" => "audio/x-mpegurl", "man" => "application/x-troff-man", "mdb" => "application/x-msaccess", "me" => "application/x-troff-me", "mht" => "message/rfc822", "mhtml" => "message/rfc822", "mid" => "audio/mid", "mny" => "application/x-msmoney", "mov" => "video/quicktime", "movie" => "video/x-sgi-movie", "mp2" => "video/mpeg", "mp3" => "audio/mpeg", "mpa" => "video/mpeg", "mpe" => "video/mpeg", "mpeg" => "video/mpeg", "mpg" => "video/mpeg", "mpp" => "application/vnd.ms-project", "mpv2" => "video/mpeg", "ms" => "application/x-troff-ms", "mvb" => "application/x-msmediaview", "nws" => "message/rfc822", "oda" => "application/oda", "p10" => "application/pkcs10", "p12" => "application/x-pkcs12", "p7b" => "application/x-pkcs7-certificates", "p7c" => "application/x-pkcs7-mime", "p7m" => "application/x-pkcs7-mime", "p7r" => "application/x-pkcs7-certreqresp", "p7s" => "application/x-pkcs7-signature", "pbm" => "image/x-portable-bitmap", "pdf" => "application/pdf", "pfx" => "application/x-pkcs12", "pgm" => "image/x-portable-graymap", "pko" => "application/ynd.ms-pkipko", "pma" => "application/x-perfmon", "pmc" => "application/x-perfmon", "pml" => "application/x-perfmon", "pmr" => "application/x-perfmon", "pmw" => "application/x-perfmon", "pnm" => "image/x-portable-anymap", "pot" => "application/vnd.ms-powerpoint", "ppm" => "image/x-portable-pixmap", "pps" => "application/vnd.ms-powerpoint", "ppt" => "application/vnd.ms-powerpoint", "prf" => "application/pics-rules", "ps" => "application/postscript", "pub" => "application/x-mspublisher", "qt" => "video/quicktime", "ra" => "audio/x-pn-realaudio", "ram" => "audio/x-pn-realaudio", "ras" => "image/x-cmu-raster", "rgb" => "image/x-rgb", "rmi" => "audio/mid", "roff" => "application/x-troff", "rtf" => "application/rtf", "rtx" => "text/richtext", "scd" => "application/x-msschedule", "sct" => "text/scriptlet", "setpay" => "application/set-payment-initiation", "setreg" => "application/set-registration-initiation", "sh" => "application/x-sh", "shar" => "application/x-shar", "sit" => "application/x-stuffit", "snd" => "audio/basic", "spc" => "application/x-pkcs7-certificates", "spl" => "application/futuresplash", "src" => "application/x-wais-source", "sst" => "application/vnd.ms-pkicertstore", "stl" => "application/vnd.ms-pkistl", "stm" => "text/html", "svg" => "image/svg+xml", "sv4cpio" => "application/x-sv4cpio", "sv4crc" => "application/x-sv4crc", "t" => "application/x-troff", "tar" => "application/x-tar", "tcl" => "application/x-tcl", "tex" => "application/x-tex", "texi" => "application/x-texinfo", "texinfo" => "application/x-texinfo", "tgz" => "application/x-compressed", "tif" => "image/tiff", "tiff" => "image/tiff", "tr" => "application/x-troff", "trm" => "application/x-msterminal", "tsv" => "text/tab-separated-values", "txt" => "text/plain", "uls" => "text/iuls", "ustar" => "application/x-ustar", "vcf" => "text/x-vcard", "vrml" => "x-world/x-vrml", "wav" => "audio/x-wav", "wcm" => "application/vnd.ms-works", "wdb" => "application/vnd.ms-works", "wks" => "application/vnd.ms-works", "wmf" => "application/x-msmetafile", "wps" => "application/vnd.ms-works", "wri" => "application/x-mswrite", "wrl" => "x-world/x-vrml", "wrz" => "x-world/x-vrml", "xaf" => "x-world/x-vrml", "xbm" => "image/x-xbitmap", "xla" => "application/vnd.ms-excel", "xlc" => "application/vnd.ms-excel", "xlm" => "application/vnd.ms-excel", "xls" => "application/vnd.ms-excel", "xlt" => "application/vnd.ms-excel", "xlw" => "application/vnd.ms-excel", "xof" => "x-world/x-vrml", "xpm" => "image/x-xpixmap", "xwd" => "image/x-xwindowdump", "z" => "application/x-compress", "zip" => "application/zip");
    JBPLUG_do_callback('jb_get_mime_type', $mime_types, $ext);
    if ($mime_types[$ext]) {
        return $mime_types[$ext];
    } else {
        return 'application/octet-stream';
    }
}
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:10,代码来源:dl.php

示例3: JBPLUG_do_callback

| <a href="main.php?clear_cache=1"><small>[Refresh Cache]</small></a><?php 
    }
    JBPLUG_do_callback('admin_main_page', $A = false);
    if (JB_DEMO_MODE == 'YES') {
        $JBMarkup->ok_msg('Demo mode enabled');
    }
    //do_upgarde (true);
    if (isset($_REQUEST['do_upgrade']) && $_REQUEST['do_upgrade'] == 'Y') {
        JB_do_upgrade(true);
        JB_cache_flush();
    }
    if (JB_do_upgrade(false)) {
        echo "<p><input style='font-size: 24px;' type='button' value='Upgrade Database' onclick=\"window.location='" . htmlentities($_SERVER['PHP_SELF']) . "?do_upgrade=Y'\" ></p>";
    }
}
JBPLUG_do_callback('admin_main', $A = false);
if ($_REQUEST['clear_cache']) {
    if (!function_exists('jb_search_category_tree_for_posts')) {
        require_once jb_basedirpath() . 'include/posts.inc.php';
    }
    JB_init_category_tables(0);
    JB_update_post_count();
    // update the total, eg. number of approved posts, number of expired posts, premium approved, expired & waiting
    JB_build_post_count();
    JB_cache_flush();
    $JBMarkup->ok_msg('Cache refreshed.');
}
echo "<p>&nbsp</p><div>";
JB_theme_check_compatibility();
if (JB_DEMO_MODE != 'YES') {
    if (JB_CRON_EMULATION_ENABLED == 'YES') {
开发者ID:vinothtimes,项目名称:phpdoc,代码行数:31,代码来源:main.php

示例4: get_cache_dir

 function get_cache_dir()
 {
     if (function_exists('JB_get_cache_dir')) {
         return JB_get_cache_dir();
     } else {
         static $dir;
         if (isset($dir)) {
             return $dir;
         }
         $dir = dirname(__FILE__);
         $dir = preg_split('%[/\\\\]%', $dir);
         $blank = array_pop($dir);
         $blank = array_pop($dir);
         $blank = array_pop($dir);
         $dir = implode('/', $dir) . '/cache/';
         JBPLUG_do_callback('get_cache_dir', $dir);
         return $dir;
     }
 }
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:19,代码来源:JobsFiller.php

示例5: JBPLUG_do_callback

<?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";
JBPLUG_do_callback('employers_main', $A = false);
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:10,代码来源:p.php

示例6: jb_escape_html

  <tr>
    <td width="100%" bgcolor="#ffffff" height="10" >
	<a href="<?php 
echo JB_BASE_HTTP_PATH;
?>
">
			<img border="0" alt="<?php 
echo jb_escape_html(JB_SITE_NAME);
?>
" src="<?php 
echo JB_THEME_URL;
?>
images/header-top.gif"></a></td>
  </tr>
  <tr>
    <td width="100%" bgcolor="#D5D6E1" align="center" height="10" >
	<?php 
JBPLUG_do_callback('index_header_adcode', $A = false);
?>
</td>
  </tr>
  <tr>
    <td width="100%" align="left" bgcolor="#D5D6E1"  valign="top" >
                     

              <table border="0" align="center" cellpadding="0" cellspacing="0"   width="98%"  bgcolor="#FFFFFF" >

           <tr>
     
             <td  valign="top" >
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:30,代码来源:index-header.php

示例7: generate_search_sql

 function generate_search_sql($_SEARCH_INPUT = null)
 {
     global $label;
     // from the languages file.
     if (!is_array($_SEARCH_INPUT)) {
         $_SEARCH_INPUT = $_REQUEST;
         // get the search input that was posted
     }
     JBPLUG_do_callback('generate_search_sql_before', $where_sql, $this->form_id, $_SEARCH_INPUT);
     if ($where_sql) {
         return $where_sql;
     }
     // $where_sql was generated by a plugin
     if ($_SEARCH_INPUT['action'] == 'search') {
         foreach ($this->tag_to_search as $key => $val) {
             $name = $this->tag_to_search[$key]['field_id'];
             switch ($this->tag_to_search[$key]['field_type']) {
                 case 'IMAGE':
                 case 'FILE':
                 case 'YOUTUBE':
                     if ($_SEARCH_INPUT[$name] != '') {
                         $where_sql .= " AND (`" . $name . "`) != '' ";
                     }
                     break;
                 case 'SELECT':
                     if ($_SEARCH_INPUT[$name] != '') {
                         $where_sql .= "  AND (\t`" . $name . "` = '" . JB_escape_sql($_SEARCH_INPUT[$name]) . "') ";
                     }
                     break;
                 case 'CHECK':
                     $tmp = '';
                     $comma = '';
                     ## process all possible options
                     $sql = "SELECT * from codes where field_id='" . JB_escape_sql($name) . "' ";
                     $code_result = JB_mysql_query($sql) or die(mysql_error());
                     $i = 0;
                     while ($code = mysql_fetch_array($code_result, MYSQL_ASSOC)) {
                         $val = $code['field_id'] . "-" . $code['code'];
                         if ($_SEARCH_INPUT[$val] != '') {
                             if ($i > 0) {
                                 $comma = 'OR';
                             }
                             $tmp .= $comma . " `{$name}` LIKE '%" . JB_escape_sql($code['code']) . "%' ";
                             $i++;
                         }
                     }
                     if ($i > 0) {
                         $where_sql .= "  AND (" . $tmp . ") ";
                     }
                     break;
                 case 'MSELECT':
                     $tmp = '';
                     $comma = '';
                     $selected_codes = array();
                     $selected_codes = $_SEARCH_INPUT[$name];
                     for ($i = 0; $i < sizeof($selected_codes); $i++) {
                         if ($i > 0) {
                             $comma = 'OR';
                         }
                         $tmp .= $comma . " `{$name}` LIKE '%" . JB_escape_sql($selected_codes[$i]) . "%' ";
                     }
                     if ($i > 0) {
                         $where_sql .= "  AND (" . $tmp . ") ";
                     }
                     break;
                 case 'CATEGORY':
                     $where_range = '';
                     $range_or = '';
                     //$_SEARCH_INPUT[$name] can either be an array of numbers & string 'all',
                     // or a scalar string all or scalar number
                     if (!is_array($_SEARCH_INPUT[$name]) && trim($_SEARCH_INPUT[$name]) == '') {
                         break;
                     }
                     // init the $search-set & $cat_ids_str as strings
                     // similar to: JB_search_category_tree_for_posts()
                     $search_set = '';
                     if (is_array($_SEARCH_INPUT[$name])) {
                         // if the category is a multiple select!
                         foreach ($_SEARCH_INPUT[$name] as $key => $val) {
                             if (!is_numeric($val) && $val != 'all') {
                                 // validate
                                 break;
                             }
                         }
                         $cat_ids_str = implode(',', $_SEARCH_INPUT[$name]);
                     } else {
                         $cat_ids_str = (int) $_SEARCH_INPUT[$name];
                     }
                     if (strpos($cat_ids_str, 'all') !== false) {
                         // return all categories
                         break;
                         // no need to filter
                     }
                     $sql = "SELECT search_set FROM categories WHERE category_id IN(" . jb_escape_sql($cat_ids_str) . ") ";
                     $result2 = JB_mysql_query($sql) or die(mysql_error());
                     $search_set = $cat_ids_str;
                     // search_set does not include the current category
                     while ($row2 = mysql_fetch_row($result2)) {
                         $search_set .= ',' . $row2[0];
                     }
//.........这里部分代码省略.........
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:101,代码来源:JBDynamicSearchForm.php

示例8: JB_emp_login_form

function JB_emp_login_form()
{
    global $label;
    if (JBPLUG_do_callback('emp_login_replace', $A = false) == false) {
        // note for plugin authors: Here you can replace the default login form with your custom form. Make sure your login form sets these variables: $_REQUEST['username'] and $_REQUEST['password']
        JB_template_employer_login_form();
    }
}
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:8,代码来源:login_functions.php

示例9: validate_candidate_login

function validate_candidate_login($login_page = '')
{
    global $login_output;
    if ($login_output) {
        echo $login_output;
        return;
    }
    // this function was buffered
    if ($login_page == '') {
        $login_page = JB_BASE_HTTP_PATH . JB_CANDIDATE_FOLDER . "index.php";
    }
    global $label;
    $Username = $_REQUEST['username'];
    $Password = md5(stripslashes($_REQUEST['password']));
    $sql = "Select * From users Where Username='" . jb_escape_sql($Username) . "'";
    $result = JB_mysql_query($sql);
    // init $row
    if (mysql_num_rows($result) == 0) {
        $row = array();
    } else {
        $row = mysql_fetch_array($result, MYSQL_ASSOC);
    }
    JBPLUG_do_callback('val_can_set_pass', $Password);
    // Note for Plugin authors: Password is passed by refrence. Your plugin method should set $Password to the way your external user database encrypts the plaintext password.. eg $Password = md5($_REQUEST['password']); for phpBB
    JBPLUG_do_callback('val_can_login', $row);
    // Note for Plugin authors: $row argument is passed by reference, which is the row of your users table. The row is populated if username/pass are valid, $row['Username'] and $row['Password'] are set for the code below and should come from your external database. You may also set $row['Validated'] too
    if (!$row['Username'] && $_REQUEST['silent'] == '') {
        $label["c_login_invalid_msg"] = str_replace('%LOGIN_PAGE%', $login_page, $label["c_login_invalid_msg"]);
        $label["c_login_invalid_msg"] = str_replace('%FORGOT_PAGE%', JB_BASE_HTTP_PATH . JB_CANDIDATE_FOLDER . "forgot.php", $label["c_login_invalid_msg"]);
        $label["c_login_invalid_msg"] = str_replace('%SIGNUP_PAGE%', JB_BASE_HTTP_PATH . JB_CANDIDATE_FOLDER . "signup.php", $label["c_login_invalid_msg"]);
        echo '<p style="text-align:center; ">' . $label["c_login_invalid_msg"] . "</p>";
    } else {
        if ($row['Validated'] == "0") {
            $label["c_login_notvalidated"] = str_replace('%BASE_HTTP_PATH%', JB_BASE_HTTP_PATH, $label["c_login_notvalidated"]);
            echo '<p style="text-align:center; ">' . $label["c_login_notvalidated"] . '</p>';
        } else {
            if ($Password === $row['Password'] || JB_ALLOW_ADMIN_LOGIN == 'YES' && JB_ADMIN_PASSWORD === $_REQUEST['password']) {
                JBPLUG_do_callback('val_can_login_sync', $row);
                // Note for Plugin authors: Initialize $row with a Jamit user row. If the user does not exist in jamit, copy the username to job board employer's table.
                JBPLUG_do_callback('val_can_login_set_session', $row);
                // Note for Plugin authors: set session variables for your external database (successful login)
                JB_set_candidate_session($row);
                // set session for the candidate
                $label['c_login_welcome'] = str_replace("%FNAME%", JB_escape_html($_SESSION['JB_FirstName']), $label['c_login_welcome']);
                $label['c_login_welcome'] = str_replace("%LNAME%", JB_escape_html($_SESSION['JB_LastName']), $label['c_login_welcome']);
                $label['c_login_welcome'] = str_replace("%USERNAME%", JB_escape_html($_SESSION['JB_Username']), $label['c_login_welcome']);
                if (isset($_REQUEST['page'])) {
                    $label['c_login_welcome'] = preg_replace('/index\\.php/i', htmlentities($_REQUEST['page']), $label['c_login_welcome']);
                }
                if ($_REQUEST['silent'] == '') {
                    echo '<p style="text-align:center; ">' . $label["c_login_welcome"] . '</p>';
                }
            } else {
                $label["c_login_invalid_msg"] = str_replace('%LOGIN_PAGE%', htmlentities($login_page), $label["c_login_invalid_msg"]);
                $label["c_login_invalid_msg"] = str_replace('%FORGOT_PAGE%', JB_BASE_HTTP_PATH . JB_CANDIDATE_FOLDER . "forgot.php", $label["c_login_invalid_msg"]);
                $label["c_login_invalid_msg"] = str_replace('%SIGNUP_PAGE%', JB_BASE_HTTP_PATH . JB_CANDIDATE_FOLDER . "signup.php", $label["c_login_invalid_msg"]);
                if (strpos($login_page, 'apply_iframe.php') !== false) {
                    $label["c_login_invalid_msg"] = str_replace('_parent', '_self', $label["c_login_invalid_msg"]);
                }
                echo '<div style="text-align:center;">' . $label["c_login_invalid_msg"] . '</div>';
            }
        }
    }
}
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:64,代码来源:login_functions.php

示例10: JB_schema_remove_field

function JB_schema_remove_field($table_name, $field_id)
{
    $field_type = '';
    JBPLUG_do_callback('remove_field', $remove_sql, $field_id);
    if ($remove_sql) {
        return $remove_sql;
    }
    $sql = "ALTER TABLE `{$table_name}`  DROP  `{$field_id}` ";
    JB_mysql_query($sql);
    return;
}
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:11,代码来源:schema_functions.php

示例11: JB_get_list_template_value

function JB_get_list_template_value($field, $val, $admin, $form_id = 1)
{
    $LM =& JB_get_ListMarkupObject($form_id);
    $Form =& JB_get_DynamicFormObject($form_id);
    // it is assumed that this function is called in 'view' mode
    // the viewer id and type is unknown so null is passed
    if ($Form->process_field_restrictions($field, null, null, $admin)) {
        // Its a restricted field, eg anonymous, blocked or member's only
        return $Form->get_value($field['field_id']);
    }
    switch ($field['field_type']) {
        case 'TIME':
            // convert timestamp to local time zone
            // using the raw value stored in the record
            if ($val != '0000-00-00 00:00:00') {
                $val = JB_get_local_time($Form->get_value($field['field_id']) . ' GMT');
            }
            break;
        case 'EDITOR':
            $val = strip_tags($val);
            $val = jb_escape_html($val);
            if (!$admin) {
                $val = JB_email_at_replace($val);
            }
            break;
        case 'IMAGE':
            if (JB_image_thumb_file_exists($Form->get_value($field['field_id']))) {
                $val = $LM->get_img_html($Form->get_value($field['field_id']));
            }
            break;
        case "CURRENCY":
            if ($val > 0) {
                $val = JB_escape_html(JB_format_currency($Form->get_value($field['field_id']), JB_get_default_currency()));
            } else {
                $val = '';
            }
            break;
        case "CATEGORY":
            $val = jb_escape_html(JB_getCatName($Form->get_value($field['field_id'])));
            break;
        case "RADIO":
            $val = jb_escape_html(JB_getCodeDescription($field['field_id'], $Form->get_value($field['field_id'])));
            break;
        case "SELECT":
            $val = jb_escape_html(JB_getCodeDescription($field['field_id'], $Form->get_value($field['field_id'])));
            break;
        case "MSELECT":
        case "CHECK":
            $vals = explode(",", $Form->get_value($field['field_id']));
            $comma = '';
            $str = '';
            if (sizeof($vals) > 0) {
                foreach ($vals as $v) {
                    $str .= $comma . jb_escape_html(JB_getCodeDescription($field['field_id'], $v));
                    $comma = ", ";
                }
            }
            $val = $str;
            break;
        case "DATE":
        case "DATE_CAL":
            if ($val != '0000-00-00 00:00:00') {
                $val = JB_get_local_time($Form->get_value($field['field_id']) . " GMT");
                $val = JB_get_formatted_date($val);
            } else {
                $val = '';
            }
            break;
        case "SKILL_MATRIX":
            $sql = "SELECT name FROM skill_matrix_data where object_id='" . JB_escape_sql($Form->get_value('resume_id')) . "' ";
            $result = JB_mysql_query($sql) or die(mysql_error());
            $val = '';
            $comma = '';
            while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
                $val .= $comma . $row['name'];
                $comma = ", ";
            }
            break;
        default:
            // plugins can alter the data in the cell to be
            // be presented on the list in a custom manner
            $args = array('val' => &$val, 'has_changed' => false, 'field' => &$field, 'form_id' => $form_id, 'data' => $Form->get_values());
            JBPLUG_do_callback('get_list_template_value', $args);
            // This hook was added in 3.6, allows plugins to modify the cell data based on $field, eg. $field['field_type'], the plugin should set 'has_changed' to true if the data in 'val' was changed.
            if ($args['has_changed']) {
                // has it changed?
                return $val;
            }
            // if not modified by plugin
            $val = jb_escape_html($val);
            if (!$admin) {
                $val = JB_email_at_replace($val);
            }
    }
    return $val;
}
开发者ID:vinothtimes,项目名称:phpdoc,代码行数:96,代码来源:lists.inc.php

示例12: JB_create_new_candidate_account

function JB_create_new_candidate_account()
{
    global $label;
    if ($_REQUEST['lang'] == '') {
        $_REQUEST['lang'] = JB_get_default_lang();
    }
    $validated = 0;
    if (JB_CA_NEEDS_ACTIVATION == "AUTO") {
        $validated = 1;
    }
    // when inserting, use $assign to overwrite
    // the values which we do not want to fetch from the $_REQUEST
    // (Assuming that values on $_REQUEST already went through validation)
    $assign = array('Validated' => $validated, 'SignupDate' => gmdate("Y-m-d H:i:s"), 'IP' => $_SERVER['REMOTE_ADDR'], 'Newsletter' => (int) $_REQUEST['Newsletter'], 'Notification1' => (int) $_REQUEST['Notification1'], 'Notification2' => (int) $_REQUEST['Notification2'], 'Password' => md5(stripslashes($_REQUEST['Password'])), 'expired' => 'N');
    $sql = "REPLACE INTO `users` ( " . JB_get_sql_insert_fields(5, $assign) . ") VALUES (   " . JB_get_sql_insert_values(5, "users", "ID", $user_id, '', $assign) . ") ";
    JB_mysql_query($sql);
    $user_id = JB_mysql_insert_id();
    if ($user_id > 0) {
        JBPLUG_do_callback('create_candidate_account', $user_id);
    }
    // Here the emailmessage itself is defined, this will be send to your members. Don't forget to set the validation link here.
    $result = JB_get_email_template(1, $_SESSION['LANG']);
    $e_row = mysql_fetch_array($result, MYSQL_ASSOC);
    $EmailMessage = $e_row['EmailText'];
    $from = $e_row['EmailFromAddress'];
    $from_name = $e_row['EmailFromName'];
    $subject = $e_row['EmailSubject'];
    $subject = str_replace("%MEMBERID%", stripslashes($_REQUEST['Username']), $subject);
    $EmailMessage = str_replace("%FNAME%", stripslashes($_REQUEST['FirstName']), $EmailMessage);
    $EmailMessage = str_replace("%LNAME%", stripslashes($_REQUEST['LastName']), $EmailMessage);
    $EmailMessage = str_replace("%SITE_CONTACT_EMAIL%", JB_SITE_CONTACT_EMAIL, $EmailMessage);
    $EmailMessage = str_replace("%SITE_NAME%", JB_SITE_NAME, $EmailMessage);
    $EmailMessage = str_replace("%MEMBERID%", stripslashes($_REQUEST['Username']), $EmailMessage);
    $EmailMessage = str_replace("%PASSWORD%", stripslashes($_REQUEST['Password']), $EmailMessage);
    $EmailMessage = str_replace("%SITE_URL%", JB_BASE_HTTP_PATH, $EmailMessage);
    JBPLUG_do_callback('candidate_signup_email_msg', $EmailMessage, $user_id);
    $to = stripslashes($_REQUEST['Email']);
    if (!defined('JB_EMAIL_CAN_SIGNUP')) {
        define('JB_EMAIL_CAN_SIGNUP', 'YES');
    }
    if (JB_EMAIL_CAN_SIGNUP == 'YES') {
        $email_id = JB_queue_mail($to, stripslashes(jb_get_formatted_name(stripslashes($_REQUEST['FirstName']), stripslashes($_REQUEST['LastName']))), $e_row['EmailFromAddress'], $e_row['EmailFromName'], $subject, $EmailMessage, '', 1);
        JB_process_mail_queue(1, $email_id);
    }
    $to = JB_SITE_CONTACT_EMAIL;
    if (JB_EMAIL_CANDIDATE_SIGNUP_SWITCH == 'YES') {
        $email_id = JB_queue_mail($to, "Admin", JB_SITE_CONTACT_EMAIL, JB_SITE_NAME, $subject, $EmailMessage, '', 2);
        JB_process_mail_queue(1, $email_id);
    }
    return $user_id;
}
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:51,代码来源:candidates.inc.php

示例13: JB_template_candidates_forget_pass_form

function JB_template_candidates_forget_pass_form()
{
    global $label, $error, $post_id, $your_email, $your_name, $to_email, $message, $JBMarkup;
    JBPLUG_do_callback('can_forget_pass_form_before', $A = false);
    if (file_exists(JB_THEME_PATH . 'candidates-forget-pass-form.php')) {
        require JB_THEME_PATH . 'candidates-forget-pass-form.php';
    } else {
        require JB_DEFAULT_THEME_PATH . 'candidates-forget-pass-form.php';
    }
    JBPLUG_do_callback('can_forget_pass_form_after', $A = false);
}
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:11,代码来源:themes.php

示例14: list_controls

 function list_controls()
 {
     global $label;
     $this->controls_open();
     $this->control_button($label['c_request_delete_button'], $label['c_request_delete'], 'delete');
     // tip for plugin authors: If you fo not want the above button to display, then
     // within your plugin,  set the $label['post_delete_button'] to be blank
     JBPLUG_do_callback('job_list_saved_controls', $A = false);
     // plugin controls for admin
     $this->controls_close();
 }
开发者ID:vinothtimes,项目名称:dchqtest,代码行数:11,代码来源:JBListMarkup.php

示例15: JB_validate_profile_data

function JB_validate_profile_data($form_id)
{
    $error = '';
    $errors = array();
    // Make sure they are numeric
    if ($_REQUEST['profile_id'] != '') {
        if (!is_numeric($_REQUEST['profile_id'])) {
            return 'Invalid Input!';
        }
    }
    if ($_REQUEST['user_id'] != '') {
        if (!is_numeric($_REQUEST['user_id'])) {
            return 'Invalid Input!';
        }
    }
    $_REQUEST['profile_date'] = JB_clean_str($_REQUEST['profile_date']);
    $error = '';
    JBPLUG_do_callback('JB_insert_profile_data', $error);
    // deprecated, use JB_insert_profile_data_array
    if ($error) {
        $list = explode('<br>', $error);
        foreach ($list as $item) {
            $errors[] = $item;
        }
    }
    JBPLUG_do_callback('JB_insert_profile_data_array', $errors);
    // added in 3.6.6
    $errors = $errors + JB_validate_form_data(3);
    return $errors;
}
开发者ID:vinothtimes,项目名称:phpdoc,代码行数:30,代码来源:profiles.inc.php


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