Пример #1
0
function cc_whmcs_bridge_parse_url($redir)
{
    cc_whmcs_bridge_home($home, $pid, false);
    $whmcs = cc_whmcs_bridge_url();
    if (substr($whmcs, -1) != '/') {
        $whmcs .= '/';
    }
    $f[] = '/' . preg_quote($whmcs, '/') . 'viewinvoice\\.php\\?id\\=([0-9]*?)&(.*?)$/';
    if (get_option('cc_whmcs_bridge_permalinks')) {
        $r[] = '' . $home . 'viewinvoice/?id=$1' . $pid . '';
    } else {
        $r[] = '' . $home . '?ccce=viewinvoice&id=$1' . $pid . '';
    }
    $newRedir = preg_replace($f, $r, $redir);
    return $newRedir;
}
Пример #2
0
<h2>The Bridge Page</h2>
<p>A WHMCS front end page has been created on your WordPress site.
    This page is the main interaction page between Wordpress and WHMCS.</p>
<p>The full url is:
    <a href="<?php 
echo cc_whmcs_bridge_home($home, $pid);
?>
">
        <code>
            <?php 
echo cc_whmcs_bridge_home($home, $pid);
?>
        </code>
    </a>.
    You can edit the page link by editing the page and changing the permalink.</p>
<p style="color:red"><strong>Do not delete this page!</strong></p>

<?php 
if (defined("CC_WHMCS_BRIDGE_SSO_PLUGIN") && file_exists(dirname(__FILE__) . '/../../whmcs-bridge-sso/pages/help.php')) {
    require dirname(__FILE__) . '/../../whmcs-bridge-sso/pages/help.php';
} else {
    ?>

<?php 
}