コード例 #1
0
ファイル: help.php プロジェクト: sgh1986915/php-crm
    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 
    }
コード例 #2
0
ファイル: job_discussion.php プロジェクト: sgh1986915/php-crm
 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);
 }
コード例 #3
0
 /**
  * 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() */
 }
コード例 #4
0
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!
コード例 #5
0
ファイル: home.php プロジェクト: sgh1986915/php-crm
 * 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:
コード例 #6
0
ファイル: encrypt_popup.php プロジェクト: sgh1986915/php-crm
<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 
コード例 #7
0
ファイル: init.php プロジェクト: sgh1986915/php-crm
//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'));
コード例 #8
0
        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 
コード例 #9
0
ファイル: social.php プロジェクト: sgh1986915/php-crm
 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) . '');
 }
コード例 #10
0
ファイル: change_request.php プロジェクト: sgh1986915/php-crm
 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));
 }
コード例 #11
0
                        </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)) {
コード例 #12
0
    $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>
コード例 #13
0
 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);
 }
コード例 #14
0
 * 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>
コード例 #15
0
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 
}
コード例 #16
0
ファイル: faq.php プロジェクト: sgh1986915/php-crm
 public static function link_external_faq_ticket()
 {
     return full_link(_EXTERNAL_TUNNEL_REWRITE . 'm.faq/h.ticket_list/');
 }
コード例 #17
0
 public static function external_url_callback()
 {
     return full_link(_EXTERNAL_TUNNEL . '?m=paymethod_coinbase&h=event_ipn&method=coinbase');
 }
コード例 #18
0
ファイル: init.php プロジェクト: sgh1986915/php-crm
<?php

/** 
 * 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
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
module_config::register_css('theme', 'left_style.css', full_link('/includes/plugin_theme/themes/left/css/left_style.css'));
コード例 #19
0
                    (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">
コード例 #20
0
ファイル: config.php プロジェクト: sgh1986915/php-crm
 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;
 }
コード例 #21
0
ファイル: data.php プロジェクト: sgh1986915/php-crm
 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));
 }
コード例 #22
0
ファイル: init.php プロジェクト: sgh1986915/php-crm
    $_REQUEST['display_mode'] = 'adminlte';
}
require_once module_theme::include_ucm('includes/plugin_theme_adminlte/functions.php');
module_config::register_css('theme', 'bootstrap.min.css', full_link('/includes/plugin_theme_adminlte/css/bootstrap.min.css'), 11);
module_config::register_css('theme', 'font-awesome.min.css', full_link('/includes/plugin_theme_adminlte/css/font-awesome.min.css'), 11);
module_config::register_css('theme', 'jquery.ui.min.css', full_link('/includes/plugin_theme_adminlte/css/jquery-ui-1.10.3.custom.css'), 5);
//module_config::register_css('theme','jquery.ui.structure.min.css',full_link('/includes/plugin_theme_adminlte/css/jquery-ui.structure.min.css'),6);
//module_config::register_css('theme','jquery.ui.theme.min.css',full_link('/includes/plugin_theme_adminlte/css/jquery-ui.theme.min.css'),7);
module_config::register_css('theme', 'AdminLTE.css', full_link('/includes/plugin_theme_adminlte/css/AdminLTE.css'), 12);
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_adminlte/css/external.css'), 100);
}
module_config::register_js('theme', 'jquery.min.js', full_link('/includes/plugin_theme_adminlte/js/jquery.min.js'), 1);
module_config::register_js('theme', 'jquery-ui.min.js', full_link('/includes/plugin_theme_adminlte/js/jquery-ui-1.10.3.custom.min.js'), 2);
module_config::register_js('theme', 'cookie.js', full_link('/js/cookie.js'), 3);
module_config::register_js('theme', 'javascript.js', full_link('/js/javascript.js'), 4);
module_config::register_js('theme', 'bootstrap.min.js', full_link('/includes/plugin_theme_adminlte/js/bootstrap.min.js'), 6);
module_config::register_js('theme', 'app.js', full_link('/includes/plugin_theme_adminlte/js/AdminLTE/app.js'));
module_config::register_js('theme', 'adminlte.js', full_link('/includes/plugin_theme_adminlte/js/adminlte.js'));
function adminlte_dashboard_widgets()
{
    $widgets = array();
    // the 4 column widget areas:
    foreach (glob(dirname(__FILE__) . '/dashboard_widgets/widget_*.php') as $dashboard_widget_file) {
        // echo $dashboard_widget_file;
        include $dashboard_widget_file;
    }
    return $widgets;
}
// end hook function
hook_add('dashboard_widgets', 'adminlte_dashboard_widgets');
コード例 #23
0
ファイル: invoice.php プロジェクト: sgh1986915/php-crm
 public static function link_public_print($invoice_id, $h = false)
 {
     if ($h) {
         return md5('s3cret7hash for invoice ' . _UCM_SECRET . ' ' . $invoice_id);
     }
     return full_link(_EXTERNAL_TUNNEL_REWRITE . 'm.invoice/h.public_print/i.' . $invoice_id . '/hash.' . self::link_public_print($invoice_id, true));
 }
コード例 #24
0
ファイル: job.php プロジェクト: sgh1986915/php-crm
 public static function link_public($job_id, $h = false)
 {
     if ($h) {
         return md5('s3cret7hash for job ' . _UCM_SECRET . ' ' . $job_id);
     }
     return full_link(_EXTERNAL_TUNNEL_REWRITE . 'm.job/h.public/i.' . $job_id . '/hash.' . self::link_public($job_id, true));
 }
コード例 #25
0
ファイル: file.php プロジェクト: sgh1986915/php-crm
 public static function link_public($file_id, $h = false)
 {
     if ($h) {
         return md5('s3cret7hash files ' . _UCM_SECRET . ' ' . $file_id);
     }
     if (_REWRITE_LINKS) {
         return full_link(_EXTERNAL_TUNNEL_REWRITE . 'm.file/h.view/i.' . $file_id . '/hash.' . self::link_public($file_id, true));
     } else {
         return full_link(_EXTERNAL_TUNNEL . '?m=file&h=view&i=' . $file_id . '&hash=' . self::link_public($file_id, true));
     }
 }
コード例 #26
0
ファイル: security.php プロジェクト: sgh1986915/php-crm
 public static function generate_auto_login_link($user_id)
 {
     if ((int) $user_id) {
         return full_link("?auto_login=" . self::get_auto_login_string($user_id));
     }
 }
コード例 #27
0
ファイル: map_admin.php プロジェクト: sgh1986915/php-crm
customer_id='+ customer_address[i].customer_id + '">' + customer_address[i].customer_name + '</a><br/>' + customer_address[i].full_address);
            bounds.extend(pos);
		}else{
			// have to geocode this one.
            timeout_index++;
            (function(){
                var index = i;
                setTimeout(function(){
                    var address = customer_address[index].full_address;
                    var cust = customer_address[index];
                    geocoder.geocode( { 'address': address}, function(results, status) {
                        if (status == google.maps.GeocoderStatus.OK) {
                            $.ajax({
                                type: "POST",
                                url: '<?php 
echo full_link('?m=map&p=map_admin&_process=ajax_save_map_coords');
?>
',
                                data: {
                                    address_id: cust.address_id,
                                    address_hash: cust.address_hash,
                                    lat: results[0].geometry.location.lat(),
                                    lng: results[0].geometry.location.lng()
                                },
                                dataType: "json",
                                success: function(d){
                                }
                            });
                            customer_address[index].marker = new google.maps.Marker({
                                map: map,
                                position: results[0].geometry.location
コード例 #28
0
ファイル: encrypt.php プロジェクト: sgh1986915/php-crm
 /**
  * This is where all the magic happens.
  * We take a page name (ie: the name of the 'plugin_extra' block like 'customer') and the html_data for that page (or block, or single input element)
  * We check each of the input elements (there may be more than 1 in the html data!) to see if any of them are marked for encryption (see encrypt_field table)
  *
  * @static
  * @param $page_name
  * @param $html_data
  */
 public static function parse_html_input($page_name, $html_data, $edit = true)
 {
     // find out what field names are encrypted against thie 'page_name'
     $fields = get_multiple('encrypt_field', array('page_name' => $page_name), 'field_name');
     // convert any of these encrypted fields into a ****** [lock] block.
     // first look for all text input fields (could also be date input fields!)
     if (preg_match_all('#<input[^>]*type="text"[^>]*>#imsU', $html_data, $matches)) {
         foreach ($matches[0] as $match) {
             if (preg_match('#display\\s*:\\s*none#', $match)) {
                 continue;
             }
             if (preg_match('#\\[new\\]#', $match)) {
                 continue;
             }
             // find the id or the name of each element.
             $encrypt_field_id = false;
             $encrypt_field_name = '';
             if (preg_match('#id="([^"]*)"#', $match, $name_matches)) {
                 $encrypt_field_name = $name_matches[1];
             } else {
                 if (preg_match('#name="([^"]*)"#', $match, $name_matches)) {
                     $encrypt_field_name = $name_matches[1];
                 }
             }
             if (isset($fields[$encrypt_field_name])) {
                 // this is an encryptable field!
                 $encrypt_field_id = $fields[$encrypt_field_name]['encrypt_field_id'];
             }
             $existing_value = '';
             if (preg_match('#value="([^"]+)#', $match, $value_matches)) {
                 if (strpos($value_matches[1], 'encrypt:') === false) {
                     $existing_value = $value_matches[1];
                 }
             }
             if ($encrypt_field_id) {
                 // find the "vlaue" of this input box.
                 // the value will be the id in the encrypt table.
                 // it should look something like this:
                 //    encrypt:123
                 $encrypt_id = 0;
                 // new value
                 $replace = '';
                 // what we are going to replace this with.
                 if (preg_match('#value="encrypt:([^"]*)"#', $match, $value_matches)) {
                     $encrypt_id = (int) $value_matches[1];
                     // remove the value from the input box and display our empty box on the page.
                     // rename our real box to a hidden input and give it an id so we can load our
                     // encrypt:123 value into it for submission.
                     $dummy_input = preg_replace('#value="[^"]+"#', 'value="*********"', $match);
                     $dummy_input = preg_replace('#id="[^"]+"#', '', $dummy_input);
                     $dummy_input = preg_replace('#name="[^"]+"#', 'name="nothing" disabled="disabled"', $dummy_input);
                     $replace .= $dummy_input;
                     // add our hidden input back so normal form submits work.
                     // give our hidden input an id that we can work with, so we can update it's value after saving.
                     $hidden_input = preg_replace('#id="[^"]+"#', '', $match);
                     $hidden_input = preg_replace('#type="text"#i', 'type="hidden" id="encrypt_hidden_' . $encrypt_field_id . '"', $hidden_input);
                     $replace .= $hidden_input;
                 } else {
                     // no encrypted value within this field yet.
                     // we leave the box as is, but give the user the option to encrypt whatever is in it.
                     //$dummy_input = preg_replace('#value="[^"]+"#','value=""',$match);
                     // remove any id from the box.
                     $dummy_input = preg_replace('#id="[^"]+"#', '', $match);
                     $dummy_input = preg_replace('#type="text"#i', 'type="text" id="encrypt_hidden_' . $encrypt_field_id . '"', $dummy_input);
                     $replace .= $dummy_input;
                 }
                 if (!$edit) {
                     $replace = '*********';
                 }
                 // put our hidden field in here.
                 if (self::can_i('view', 'Encrypts')) {
                     $link = link_generate(array('raw' => true, array('full' => true, 'text' => '<img src="' . full_link('includes/plugin_encrypt/images/' . (!$encrypt_id ? 'un' : '') . 'lock.png') . '" style="vertical-align:top;" border="0"> ', 'module' => 'encrypt', 'page' => 'encrypt_popup', 'arguments' => array('encrypt_id' => $encrypt_id, 'encrypt_field_id' => $encrypt_field_id, 'page_name' => $page_name, 'value' => base64_encode($existing_value), 'callback_id' => 'encrypt_hidden_' . $encrypt_field_id, 'editable' => $edit))));
                     $button = '<span class="encrypt_popup">' . popup_link($link, array('width' => 600, 'height' => 400, 'force' => true, 'hide_close' => true, 'title' => _l('Encryption'))) . '</span>';
                     $replace .= ' &nbsp; ' . $button;
                 }
                 $html_data = preg_replace('#' . preg_quote($match, '#') . '#msU', str_replace('$', '\\$', $replace), $html_data);
             } else {
                 if (self::can_i('create', 'Encrypts') && $edit) {
                     // no encrypt field for this one.
                     $element_id = '';
                     if (preg_match('#id="([^"]+)"#', $match, $id_matches)) {
                         $element_id = $id_matches[1];
                     }
                     // give them an option to encrypt this field.
                     $link = link_generate(array('raw' => true, array('full' => true, 'text' => '<img src="' . full_link('includes/plugin_encrypt/images/unlock.png') . '" style="vertical-align:top;" border="0"> ', 'module' => 'encrypt', 'page' => 'encrypt_popup', 'arguments' => array('encrypt_field_name' => $encrypt_field_name, 'page_name' => $page_name, 'value' => base64_encode($existing_value), 'callback_id' => $element_id, 'editable' => $edit))));
                     $button = '<span class="encrypt_create">' . popup_link($link, array('width' => 600, 'height' => 300, 'force' => true, 'hide_close' => false)) . '</span>';
                     $html_data = preg_replace('#' . preg_quote($match, '#') . '#msU', str_replace('$', '\\$', $match) . ' &nbsp; ' . $button, $html_data);
                 }
             }
         }
     }
     // now all textareas:
     // now all select fields:
     return $html_data;
 }
コード例 #29
0
     $old_links_by_url[$parsed_url][$send_link['link_id']] = (int) $res['open_count'];
 }
 // this code is copied from newsletter::render
 $page_index = 1;
 foreach (array("href") as $type) {
     $parts = preg_split('/(<a[^>]+' . $type . '=["\'][^"\']+["\'])/', $content, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
     $content = '';
     foreach ($parts as $part_id => $content) {
         preg_match_all('/<a[^>]+' . $type . '=(["\'])([^"\']+)\\1/', $content, $links);
         if (is_array($links[2])) {
             foreach ($links[2] as $link_match_id => $l) {
                 if (!preg_match('/^\\{/', $l) && !preg_match('/^#/', $l) && !(preg_match('/^\\w+:/', $l) && !preg_match('/^http/', $l))) {
                     $search = preg_quote($links[0][$link_match_id], "/");
                     $l = preg_replace("/[\\?|&]phpsessid=([\\w\\d]+)/i", '', $l);
                     $l = ltrim($l, '/');
                     $newlink = (!preg_match('/^http/', $l) ? full_link('') : '') . $l;
                     $newlink = preg_replace('#\\&nm=\\d+#', '&nm=', $newlink);
                     $newlink = preg_replace('#\\&hash=\\w+#', '&nm=', $newlink);
                     //echo "Found link: $newlink<br>\n";
                     // search for this link in the DB
                     $sql = "SELECT * FROM `" . _DB_PREFIX . "newsletter_link` WHERE send_id = " . (int) $send_id . " AND link_url = '" . mysql_real_escape_string($newlink) . "' AND (page_index = " . (int) $page_index . " OR page_index = 0)";
                     $new_count = 0;
                     foreach (qa($sql) as $db_link) {
                         $new_count += isset($links_to_process[$db_link['link_id']]) ? $links_to_process[$db_link['link_id']] : 0;
                     }
                     $old_count = isset($old_links_by_url[$newlink]) ? array_sum($old_links_by_url[$newlink]) : 0;
                     // hack to support non-ssl links when viewing from an ssl account
                     if (!$new_count && !$old_count && isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != '' && $_SERVER['HTTPS'] != 'off') {
                         $newlink_nonssl = preg_replace('#^https:#', 'http:', $newlink);
                         if ($newlink_nonssl != $newlink) {
                             $sql = "SELECT * FROM `" . _DB_PREFIX . "newsletter_link` WHERE send_id = " . (int) $send_id . " AND link_url = '" . mysql_real_escape_string($newlink_nonssl) . "' AND (page_index = " . (int) $page_index . " OR page_index = 0)";
コード例 #30
0

<?php 
module_config::print_settings_form(array(array('key' => 'payment_method_multisafepay_enabled', 'default' => 0, 'type' => 'checkbox', 'description' => 'Enable Multisafepay Checkout'), array('key' => 'payment_method_multisafepay_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_multisafepay_account', 'default' => '', 'type' => 'text', 'description' => 'Your Multisafepay Account ID'), array('key' => 'payment_method_multisafepay_site_id', 'default' => '', 'type' => 'text', 'description' => 'Your Multisafepay Site ID'), array('key' => 'payment_method_multisafepay_side_code', 'default' => '', 'type' => 'text', 'description' => 'Your Multisafepay Site Code'), array('key' => 'payment_method_multisafepay_sandbox', 'default' => 0, 'type' => 'checkbox', 'description' => 'Use Multisafepay Testing Mode (for testing payments)')));
?>

<?php 
print_heading('Multisafepay setup instructions:');
?>

<p><strong>Note:</strong> Multisafepay only accepts EUR currency</p>

<p>Please signup for a Multisafepay account here: http://www.multisafepay.com - please enter your multisafepay account and site details above.</p>

<p>The notification url is:</p> <pre><?php 
echo full_link(_EXTERNAL_TUNNEL . '?m=paymethod_multisafepay&h=ipn&method=multisafepay&type=initial');
?>
</pre>

<p>
    Login to test merchant account here: https://testmerchant.multisafepay.com/login <br/>
    Login to live merchant account here: https://merchant.multisafepay.com/login <br/>
    Login to test user/customer account here: https://testuser.multisafepay.com/login <br/>
    Login to live user/customer account here: https://user.multisafepay.com/login <br/>
</p>

<p>
    Sandbox/Testing credit card details are:<br/><br/>
    <strong>Visa</strong><br>
    #4111111111111111  Correct <br>
    #4012888888881881  Error reason invalid balance<br/>