本文整理汇总了PHP中full_link函数的典型用法代码示例。如果您正苦于以下问题:PHP full_link函数的具体用法?PHP full_link怎么用?PHP full_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了full_link函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: header_print_js
public static function header_print_js()
{
$pages = isset($_REQUEST['p']) ? is_array($_REQUEST['p']) ? $_REQUEST['p'] : array($_REQUEST['p']) : array();
$modules = isset($_REQUEST['m']) ? is_array($_REQUEST['m']) ? $_REQUEST['m'] : array($_REQUEST['m']) : array();
foreach ($pages as $pid => $p) {
$pages[$pid] = preg_replace('#[^a-z_]#', '', $p);
}
foreach ($modules as $pid => $p) {
$modules[$pid] = preg_replace('#[^a-z_]#', '', $p);
}
?>
<script type="text/javascript">
ucm.help.current_modules = '<?php
echo implode('/', $modules);
?>
';
ucm.help.current_pages = '<?php
echo implode('/', $pages);
?>
';
ucm.help.lang.help = '<?php
_e('Help');
?>
';
ucm.help.url_extras = '&codes=<?php
echo base64_encode(module_config::c('_installation_code'));
?>
&host=<?php
echo urlencode(htmlspecialchars(full_link('/')));
?>
';
</script>
<?php
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:34,代码来源:help.php
示例2: link_public
public static function link_public($job_id, $task_id, $h = false)
{
if ($h) {
return md5('s3cret7hash for job discussion ' . _UCM_SECRET . ' ' . $job_id . ' with task ' . $task_id);
}
$url = _EXTERNAL_TUNNEL_REWRITE . 'm.job_discussion/h.public/i.' . $job_id . '/t.' . $task_id . '/hash.' . self::link_public($job_id, $task_id, true);
return full_link($url);
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:8,代码来源:job_discussion.php
示例3: init
/**
* Standard UCM function with the base module datas
*/
public function init()
{
$this->links = array();
$this->module_name = "webnpro_menu_editor";
$this->module_position = 99999;
$this->version = '1.1';
// Include the css files
module_config::register_css('webnpro_menu_editor', 'webnpro_menu_editor.css');
module_config::register_css('webnpro_menu_editor', 'font-awesome.css', full_link('/includes/plugin_webnpro_menu_editor/css/font-awesome.css'), 100);
//module_config::register_css('webnpro_menu_editor', 'font-awesome.css');
/* END public function init() */
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:15,代码来源:webnpro_menu_editor.php
示例4: array
if (!isset($options)) {
$options = array();
}
$options = module_email::get_email_compose_options($options);
extract($options);
?>
<form action="" method="post" id="template_change_form">
<input type="hidden" name="template_name" value="" id="template_name_change">
</form>
<?php
ob_start();
?>
<form action="<?php
echo full_link('email.email_compose_basic');
?>
" method="post" enctype="multipart/form-data">
<input type="hidden" name="_process" value="send_email">
<input type="hidden" name="options" value="<?php
echo base64_encode(serialize($options));
?>
">
<table class="tableclass tableclass_form tableclass_full">
<?php
if (isset($find_other_templates) && strlen($find_other_templates) && isset($current_template) && strlen($current_template)) {
$other_templates = array();
foreach (module_template::get_templates() as $possible_template) {
if (strpos($possible_template['template_key'], $find_other_templates) !== false) {
// found another one!
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:email_compose_basic.php
示例5: json_encode
* Copyright: dtbaker 2012
* Licence: Please check CodeCanyon.net for licence details.
* More licence clarification available here: http://codecanyon.net/wiki/support/legal-terms/licensing-terms/
* Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
* Envato: 4ffca17e-861e-4921-86c3-8931978c40ca, 0a3014a3-2b8f-460b-8850-d6025aa845f8
* Package Date: 2015-11-25 03:08:08
* IP Address: 67.79.165.254
*/
if (isset($_REQUEST['sort_order']) && is_array($_REQUEST['sort_order']) && isset($_REQUEST['auth']) && module_form::get_secure_key() == $_REQUEST['auth'] && module_security::is_logged_in()) {
module_config::save_config('dash_widgets_sort_' . module_security::get_loggedin_id(), json_encode($_REQUEST['sort_order']));
}
module_config::register_css('theme', 'morris.css', full_link('/includes/plugin_theme_adminlte/css/morris.css'), 12);
module_config::register_css('theme', 'ionicons.min.css', full_link('/includes/plugin_theme_adminlte/css/ionicons.min.css'), 12);
module_config::register_js('theme', 'raphael-min.js', full_link('/includes/plugin_theme_adminlte/js/AdminLTE/raphael-min.js'), 12);
module_config::register_js('theme', 'morris.min.js', full_link('/includes/plugin_theme_adminlte/js/AdminLTE/morris.min.js'), 13);
module_config::register_js('theme', 'dashboard.js', full_link('/includes/plugin_theme_adminlte/js/AdminLTE/dashboard.js'), 14);
$calling_module = 'home';
$home_widgets = handle_hook('dashboard_widgets', $calling_module);
$home_widgets2 = hook_handle_callback('dashboard_widgets');
if (is_array($home_widgets2)) {
$home_widgets = array_merge($home_widgets, $home_widgets2);
}
// group the widgets into columsn.
// the default columns is 3, but each widget can specify which column group they want to appear in.
// layout the default widget structure in the order we want it to display on the page:
$widget_columns = array();
$widget_columns[4] = array(1 => array(), 2 => array(), 3 => array(), 4 => array());
$widget_columns[1] = array(1 => array());
$widget_columns[2] = array(1 => array(), 2 => array());
$widget_columns[3] = array(1 => array(), 2 => array(), 3 => array());
// then display the welcome message:
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:home.php
示例6: full_link
<script language="JavaScript" type="text/javascript" src="<?php
echo full_link('includes/plugin_encrypt/js/rng.js');
?>
?ver=<?php
echo _SCRIPT_VERSION;
?>
"></script>
<script language="JavaScript" type="text/javascript" src="<?php
echo full_link('includes/plugin_encrypt/js/rsa.js');
?>
?ver=<?php
echo _SCRIPT_VERSION;
?>
"></script>
<script language="JavaScript" type="text/javascript" src="<?php
echo full_link('includes/plugin_encrypt/js/rsa2.js');
?>
?ver=<?php
echo _SCRIPT_VERSION;
?>
"></script>
<script type="text/javascript">
var existing_encrypt_keys = {};
<?php
foreach ($encryption_keys as $existing_encryption_key) {
?>
existing_encrypt_keys[<?php
echo $existing_encryption_key['encrypt_key_id'];
?>
] = {
'public_key': '<?php
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:encrypt_popup.php
示例7: full_link
//module_config::register_css('theme','metis_style.css',full_link('/includes/plugin_theme/themes/metis/css/metis_style.css'));
if (!isset($_REQUEST['display_mode']) || isset($_REQUEST['display_mode']) && $_REQUEST['display_mode'] != 'iframe' && $_REQUEST['display_mode'] != 'ajax') {
$_REQUEST['display_mode'] = 'metis';
}
require_once module_theme::include_ucm('includes/plugin_theme/themes/metis/metis_functions.php');
/**
* <link rel="stylesheet" href="assets/lib/bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="assets/css/main.css"/>
<link rel="stylesheet" href="assets/lib/Font-Awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/css/theme.css">
<script src="assets/lib/modernizr-build.min.js"></script>
*
* <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="assets/lib/jquery.min.js"><\/script>')</script>
<script src="assets/lib/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="assets/js/style-switcher.js"></script>
<script src="assets/js/main.js"></script>
*/
module_config::register_css('theme', 'bootstrap.css', full_link('/includes/plugin_theme/themes/metis/lib/bootstrap/css/bootstrap.min.css'), 5);
module_config::register_css('theme', 'main.css', full_link('/includes/plugin_theme/themes/metis/css/main.css'), 6);
module_config::register_css('theme', 'font-awesome.css', full_link('/includes/plugin_theme/themes/metis/lib/font-awesome-4.0.3/css/font-awesome.css'), 7);
module_config::register_css('theme', 'theme.css', full_link('/includes/plugin_theme/themes/metis/css/theme.css'), 8);
if (isset($_SERVER['REQUEST_URI']) && (strpos($_SERVER['REQUEST_URI'], _EXTERNAL_TUNNEL) || strpos($_SERVER['REQUEST_URI'], _EXTERNAL_TUNNEL_REWRITE))) {
module_config::register_css('theme', 'external.css', full_link('/includes/plugin_theme/themes/metis/css/external.css'), 100);
}
module_config::register_js('theme', 'bootstrap.js', full_link('/includes/plugin_theme/themes/metis/lib/bootstrap/js/bootstrap.min.js'));
module_config::register_js('theme', 'main.js', full_link('/includes/plugin_theme/themes/metis/js/main.js'));
module_config::register_js('theme', 'metis.js', full_link('/includes/plugin_theme/themes/metis/js/metis.js'));
//module_config::register_js('theme','config.js',full_link('/includes/plugin_theme/themes/whitelabel1/js/config.js'));
//module_config::register_js('theme','script.js',full_link('/includes/plugin_theme/themes/whitelabel1/js/script.js'));
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:init.php
示例8: foreach
foreach ($extras as $extra) {
?>
<tr>
<th nowrap="nowrap">
<?php
echo htmlspecialchars($extra['key']);
?>
</th>
<td>
<?php
module_form::generate_form_element(array('type' => $extra['type'], 'name' => 'ticket_extra[' . $extra['ticket_data_key_id'] . ']', 'value' => isset($_POST['ticket_extra']) && isset($_POST['ticket_extra'][$extra['ticket_data_key_id']]) ? $_POST['ticket_extra'][$extra['ticket_data_key_id']] : '', 'options' => isset($extra['options']) && $extra['options'] ? unserialize($extra['options']) : array()));
if (class_exists('module_encrypt', false) && module_config::c('ticket_show_encrypt_fields', 1) && isset($extra['encrypt_key_id']) && $extra['encrypt_key_id'] && ($extra['type'] == 'text' || $extra['type'] == 'textarea')) {
// hack to show the encrypt key icon if this is an encryptable key.
echo '<img src="' . full_link('includes/plugin_encrypt/images/lock.png') . '" style="vertical-align:top;" border="0">';
if (module_config::c('ticket_show_encrypt_fields_help_popup', 1)) {
_h('This field is encrypted in the database using industry standard RSA cryptography.');
}
}
?>
</td>
</tr>
<?php
}
}
}
?>
<?php
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:ticket_customer_new.php
示例9: link_social_ajax_functions
public static function link_social_ajax_functions($h = false)
{
if ($h) {
return md5('s3cret7hash for ajax social ' . _UCM_SECRET);
}
return full_link(_EXTERNAL_TUNNEL . '?m=social&h=ajax&hash=' . self::link_social_ajax_functions(true) . '');
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:7,代码来源:social.php
示例10: link_popup
public static function link_popup($website_id, $h = false)
{
if ($h) {
return md5('s3cret7hash for change requests script! ' . _UCM_SECRET . ' ' . $website_id . ' ');
}
// we have to redirect to the customers website after setting a cookie on our domain.
// HASH IS ADDED BY CLIENT.
return full_link(_EXTERNAL_TUNNEL . '?m=change_request&h=popup&i=' . $website_id . '&hash=' . self::link_popup($website_id, true));
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:9,代码来源:change_request.php
示例11: _l
</tr>
<?php
}
?>
<tr>
<th>
<?php
echo _l('Preview Image');
?>
</th>
<td>
<?php
if ($newsletter_template['directory'] && is_dir($newsletter_template['directory']) && is_file($newsletter_template['directory'] . 'preview.jpg')) {
?>
<img src="<?php
echo full_link($newsletter_template['directory'] . 'preview.jpg');
?>
">
<?php
} else {
module_file::display_files(array('owner_table' => 'newsletter_template', 'owner_id' => $newsletter_template_id, 'layout' => 'gallery'));
}
?>
</td>
</tr>
<?php
if ($newsletter_template['directory'] && is_dir($newsletter_template['directory'])) {
if (is_file($newsletter_template['directory'] . 'render.php')) {
$description = 'N/A';
$contents = file_get_contents($newsletter_template['directory'] . 'render.php');
if (preg_match('#Description:(.*)#i', $contents, $matches)) {
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:newsletter_template_edit.php
示例12: full_link
$template = module_newsletter::get_newsletter_template($template['newsletter_template_id']);
?>
<div class="template<?php
echo $newsletter['newsletter_template_id'] == $template['newsletter_template_id'] ? ' selected' : '';
?>
" onclick="$('#newsletter_template_id').val(<?php
echo $template['newsletter_template_id'];
?>
); $('.template').removeClass('selected'); $(this).addClass('selected'); $('#butt_save').click(); " style="cursor: pointer;">
<div style="height:94px; overflow: hidden;">
<?php
// find the image:
if ($template['directory'] && is_dir($template['directory']) && is_file($template['directory'] . 'preview.jpg')) {
?>
<img src="<?php
echo full_link($template['directory'] . 'preview.jpg');
?>
">
<?php
} else {
module_file::display_files(array('owner_table' => 'newsletter_template', 'owner_id' => $template['newsletter_template_id'], 'layout' => 'preview'));
}
?>
</div>
<div style="clear:both; padding:5px;"><?php
echo $template['newsletter_template_name'];
?>
</div>
</div>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:30,代码来源:newsletter_edit.php
示例13: paypal_redirect
public static function paypal_redirect($description, $amount, $user_id, $payment_id, $invoice_id, $currency_id)
{
$currency = module_config::get_currency($currency_id);
$url = 'https://www.' . (self::is_sandbox() ? 'sandbox.' : '') . 'paypal.com/cgi-bin/webscr?';
$fields = array('cmd' => '_xclick', 'business' => module_config::c('payment_method_paypal_email', _ERROR_EMAIL), 'currency_code' => $currency['code'], 'item_name' => $description, 'amount' => $amount, 'page_style' => module_config::c('paypal_page_style', ''), 'return' => module_invoice::link_public_payment_complete($invoice_id), 'rm' => 1, 'notify_url' => full_link(_EXTERNAL_TUNNEL . '?m=paymethod_paypal&h=ipn&method=paypal'), 'custom' => self::paypal_custom($user_id, $payment_id, $invoice_id));
foreach ($fields as $key => $val) {
$url .= $key . '=' . urlencode($val) . '&';
}
//echo '<a href="'.$url.'">'.$url.'</a>';exit;
redirect_browser($url);
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:11,代码来源:paymethod_paypal.php
示例14: redirect_browser
* Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
* Package Date: 2015-11-25 02:55:20
* IP Address: 67.79.165.254
*/
if (!module_config::can_i('edit', 'Settings')) {
redirect_browser(_BASE_HREF);
}
print_heading('Stripe Settings');
?>
<?php
module_config::print_settings_form(array(array('key' => 'payment_method_stripe_enabled', 'default' => 1, 'type' => 'checkbox', 'description' => 'Enable Stripe Checkout'), array('key' => 'payment_method_stripe_enabled_default', 'default' => 1, 'type' => 'checkbox', 'description' => 'Available By Default On Invoices', 'help' => 'If this option is enabled, all new invoices will have this payment method available. If this option is disabled, it will have to be enabled on individual invoices.'), array('key' => 'payment_method_stripe_label', 'default' => 'Stripe', 'type' => 'text', 'description' => 'Payment Method Label', 'help' => 'This will display on invoices as the name of this payment method.'), array('key' => 'payment_method_stripe_secret_key', 'default' => '', 'type' => 'text', 'description' => 'Your Stripe Secret Key (Test or Live)'), array('key' => 'payment_method_stripe_publishable_key', 'default' => '', 'type' => 'text', 'description' => 'Your Stripe Publishable Key (Test or Live)'), array('key' => 'payment_method_stripe_subscriptions', 'default' => 0, 'type' => 'checkbox', 'description' => 'Enable Stripe Subscriptions (set web hook below!)'), array('key' => 'payment_method_stripe_currency', 'default' => '', 'type' => 'text', 'description' => 'Which Currencies To Support', 'help' => 'A comma separated list of currencies to support, eg: AUD,USD Leave this blank to support all currencies. If an invoice is in an unsupported currency then this payment method will not display.'), array('key' => 'payment_method_stripe_limit_type', 'default' => 'above', 'type' => 'select', 'options' => array('above' => _l('Greater Than...'), 'below' => _l('Less Than...')), 'description' => 'Only show when invoice value is ...', 'help' => 'Only show the stripe option if the dollar value is greater than or less than the below value.'), array('key' => 'payment_method_stripe_limit_value', 'default' => '0', 'type' => 'text', 'description' => '... this amount', 'help' => 'What value to restrict stripe payments to'), array('key' => 'payment_method_stripe_charge_percent', 'default' => 0, 'type' => 'text', 'description' => 'Additional Charge (as %)', 'help' => 'Example: 1.5 do not enter %% sign'), array('key' => 'payment_method_stripe_charge_amount', 'default' => 0, 'type' => 'text', 'description' => 'Additional Charge (as $)', 'help' => 'Example: 1.5 do not enter $ sign'), array('key' => 'payment_method_stripe_charge_description', 'default' => 'Stripe Fee', 'type' => 'text', 'description' => 'Additional Charge (Description)', 'help' => 'This will show on the Invoice when paying via stripe')));
?>
<?php
print_heading('Stripe setup instructions:');
?>
<p>Stripe only supports payments in USD and CAD </p>
<p>Please signup for a Strip account here: http://www.stripe.com - please enter your stripe API Keys above.</p>
<p>If you are using the TEST api keys then you can use the credit card number 4242424242424242 with any valid expiry date of CVC</p>
<?php
print_heading('Stripe subscriptions:');
?>
<p><strong>WebHook:</strong> if you are planning to offer subscriptions via stripe (enabled above) please set the webhook address (in Stripe settings) to: <?php
echo full_link(_EXTERNAL_TUNNEL . '?m=paymethod_stripe&h=event_ipn&method=stripe');
?>
</p>
<p>Also please go to Settings > Update and click the Manual Update button, just to be sure!</p>
<p>As always, set the TEST API keys above first and do a test subscription payment to ensure it all works correctly.</p>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:stripe_settings.php
示例15: redirect_browser
if (!module_config::can_i('edit', 'Settings')) {
redirect_browser(_BASE_HREF);
}
print_heading('PayPal Settings');
?>
<?php
module_config::print_settings_form(array(array('key' => 'payment_method_paypal_enabled', 'default' => 1, 'type' => 'checkbox', 'description' => 'Enable PayPal Checkout'), array('key' => 'payment_method_paypal_enabled_default', 'default' => 1, 'type' => 'checkbox', 'description' => 'Available By Default On Invoices', 'help' => 'If this option is enabled, all new invoices will have this payment method available. If this option is disabled, it will have to be enabled on individual invoices.'), array('key' => 'payment_method_paypal_label', 'default' => 'PayPal', 'type' => 'text', 'description' => 'Payment Method Label', 'help' => 'This will display on invoices as the name of this payment method.'), array('key' => 'payment_method_paypal_email', 'default' => _ERROR_EMAIL, 'type' => 'text', 'description' => 'Your PayPal registered email address'), array('key' => 'payment_method_paypal_sandbox', 'default' => 0, 'type' => 'checkbox', 'description' => 'Use PayPal Sandbox Mode (for testing payments)'), array('key' => 'payment_method_paypal_subscriptions', 'default' => 0, 'type' => 'checkbox', 'description' => 'Enable PayPal recurring payments', 'help' => 'Be sure to set the paypal IPN url to ' . full_link(_EXTERNAL_TUNNEL . '?m=paymethod_paypal&h=ipn&method=paypal') . ' in your paypal account settings.'), array('key' => 'payment_method_paypal_currency', 'default' => '', 'type' => 'text', 'description' => 'Which Currencies To Support', 'help' => 'A comma separated list of currencies to support, eg: AUD,USD Leave this blank to support all currencies. If an invoice is in an unsupported currency then this payment method will not display.'), array('key' => 'payment_method_paypal_limit_type', 'default' => 'above', 'type' => 'select', 'options' => array('above' => _l('Greater Than...'), 'below' => _l('Less Than...')), 'description' => 'Only show when invoice value is ...', 'help' => 'Only show the paypal option if the dollar value is greater than or less than the below value.'), array('key' => 'payment_method_paypal_limit_value', 'default' => '0', 'type' => 'text', 'description' => '... this amount', 'help' => 'What value to restrict paypal payments to'), array('key' => 'payment_method_paypal_charge_percent', 'default' => 0, 'type' => 'text', 'description' => 'Additional Charge (as %)', 'help' => 'Example: 2.9 do not enter %% sign'), array('key' => 'payment_method_paypal_charge_amount', 'default' => 0, 'type' => 'text', 'description' => 'Additional Charge (as $)', 'help' => 'Example: 0.30 do not enter $ sign'), array('key' => 'invoice_fee_calculate_reverse', 'default' => 0, 'type' => 'checkbox', 'description' => 'Calculate as provider fee', 'help' => 'If this is enabled then it will work out the fee in reverse. Enable this option in order to receive the correct amount from PayPal if you have set 2.9%% and 0.30 above.'), array('key' => 'payment_method_paypal_charge_description', 'default' => 'PayPal Fee', 'type' => 'text', 'description' => 'Additional Charge (Description)', 'help' => 'This will show on the Invoice when paying via PayPal')));
?>
<?php
print_heading('PayPal setup instructions:');
?>
<p>Please signup for a PayPal business account here: http://www.paypal.com - please enter your paypal email address above.</p>
<?php
if (module_config::c('payment_method_paypal_subscriptions', 0)) {
?>
<?php
print_heading('PayPal subscription setup instructions:');
?>
<p>Please signup for a <strong>Business or Premier</strong> account as above. <strong>Important:</strong> for subscriptions to work correctly you need to go into your PayPal settings and add this URL as your IPN address: <?php
echo full_link(_EXTERNAL_TUNNEL . '?m=paymethod_paypal&h=ipn&method=paypal');
?>
(<a href="https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNSetup/">instructions</a>) </p>
<?php
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:paypal_settings.php
示例16: link_external_faq_ticket
public static function link_external_faq_ticket()
{
return full_link(_EXTERNAL_TUNNEL_REWRITE . 'm.faq/h.ticket_list/');
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:4,代码来源:faq.php
示例17: external_url_callback
public static function external_url_callback()
{
return full_link(_EXTERNAL_TUNNEL . '?m=paymethod_coinbase&h=event_ipn&method=coinbase');
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:4,代码来源:paymethod_coinbase.php
示例18: function
(function(){
const $srt = $(t);
console.debug($srt);
$srt.sortable({
cancel: '.ui-state-disabled',
helper: function(e, ui) {
ui.children().each(function() {
$srt.css('width',$srt.width());
});
ui.css('width','auto');
return ui;
},
update: function(event, ui) {
var order = $srt.sortable('serialize');
$.post("<?php
echo full_link("?m=data&_process=save_ajax&type=position&data_field_group_id=" . (int) $data_field_group['data_field_group_id']);
?>
", order);
}
}).disableSelection();
})();
});
<?php
break;
}
?>
});
</script>
<style type="text/css">
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:data_type_admin_group_open.php
示例19: check_for_upgrades
public static function check_for_upgrades($requested_plugin = '', $get_file_contents = 0)
{
// compile a list of current plugins
// along with the users installation code
// send it to our server and get a response with a list of available updates for this user.
$current_plugins = array();
$current_files = array();
global $plugins;
if (_DEBUG_MODE) {
module_debug::log(array('title' => 'Checking for upgrades:', 'data' => 'start'));
}
foreach ($plugins as $plugin_name => $p) {
if ($requested_plugin && $requested_plugin != $plugin_name) {
continue;
}
if (!$p->is_plugin_enabled()) {
$p->init();
}
$current_plugins[$plugin_name] = $p->get_plugin_version();
// find all the files related to this plugin.
if (function_exists('getFilesFromDir') && module_config::c('upgrade_post_file_list', 1)) {
$directory = 'includes/plugin_' . $plugin_name . '/';
$files = getFilesFromDir($directory);
$files = array_flip($files);
foreach ($files as $file => $tf) {
// ignore certain files.
if (strpos($file, 'plugin_file/upload') !== false || strpos($file, 'plugin_data/upload') !== false || strpos($file, '/cache/') !== false || strpos($file, '/html2ps/') !== false || strpos($file, 'backup/backups/backup_') !== false || strpos($file, '/attachments/') !== false || strpos($file, '/temp/') !== false || strpos($file, '/tmp/') !== false) {
unset($files[$file]);
} else {
$d = preg_replace('#Envato:[^\\r\\n]*#', '', preg_replace('#Package Date:[^\\r\\n]*#', '', preg_replace('#IP Address:[^\\r\\n]*#', '', preg_replace('#Licence:[^\\r\\n]*#', '', file_get_contents($file)))));
$files[$file] = md5(base64_encode($d));
}
}
$current_files[$plugin_name] = $files;
}
if (_DEBUG_MODE) {
module_debug::log(array('title' => 'Checking for upgrades:', 'data' => $plugin_name . ' done'));
}
}
//print_r($current_files);exit;
$available_updates = array();
$post_fields = array('application' => _APPLICATION_ID, 'installation_code' => module_config::c('_installation_code'), 'current_version' => module_config::c('_admin_system_version', 2.1), 'current_plugins' => json_encode($current_plugins), 'current_files' => json_encode($current_files), 'client_ip' => $_SERVER['REMOTE_ADDR'], 'installation_location' => full_link('/'), 'requested_plugin' => $requested_plugin, 'get_file_contents' => $get_file_contents);
$url = module_config::c('ucm_upgrade_url', 'http://api.ultimateclientmanager.com/upgrade.php');
if ($url == 'http://ultimateclientmanager.com/api/upgrade.php') {
$url = 'http://api.ultimateclientmanager.com/upgrade.php';
// hack to use new update subdomain
}
if ($url != 'http://ultimateclientmanager.com/api/upgrade.php' && $url != 'http://api.ultimateclientmanager.com/upgrade.php') {
set_error('Incorrect API url');
redirect_browser(_BASE_HREF);
}
if (_DEBUG_MODE) {
module_debug::log(array('title' => 'Checking for upgrades:', 'data' => 'Posting to API'));
}
if (!function_exists('curl_init')) {
$postdata = http_build_query($post_fields);
$opts = array('http' => array('method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata));
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
} else {
//$url = 'http://localhost/ucm/web/api/upgrade.php';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
// fixes netregistr, may break others?
$result = curl_exec($ch);
}
$data = json_decode($result, true);
if (_DEBUG_MODE) {
module_debug::log(array('title' => 'Checking for upgrades:', 'data' => 'Received response from API'));
}
if ($data && isset($data['available_updates']) && is_array($data['available_updates'])) {
$available_updates = $data['available_updates'];
}
if ($data && isset($data['licence_codes']) && is_array($data['licence_codes'])) {
// find out what the licence codes are (url / name) so we can dispaly this under each code nicely.
foreach ($data['licence_codes'] as $code => $foo) {
if (strlen($code) > 10 && strlen($foo) > 10) {
module_config::save_config('_licence_code_' . $code, $foo);
// this might not be working
}
}
}
if (!$data) {
echo $result;
}
//echo '<pre>';print_r($current_plugins);print_r($result);echo '</pre>';
return $available_updates;
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:92,代码来源:config.php
示例20: link_public_file_download
public static function link_public_file_download($data_record_id, $data_type_id, $data_field_group_id, $data_field_id, $h = false)
{
if ($h) {
return md5('hash for Download file ' . _UCM_SECRET . ' ' . $data_record_id . ' ' . $data_type_id . ' ' . $data_field_group_id . ' ' . $data_field_id);
}
return full_link(_EXTERNAL_TUNNEL_REWRITE . 'm.data/h.download/dri.' . $data_record_id . '/dti.' . $data_type_id . '/dfgi.' . $data_field_group_id . '/dfi.' . $data_field_id . '/hash.' . self::link_public_file_download($data_record_id, $data_type_id, $data_field_group_id, $data_field_id, true));
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:7,代码来源:data.php
注:本文中的full_link函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论