Ejemplo n.º 1
0
function zbs_AnnouncementsShow()
{
    $query = "SELECT * from `zbsannouncements` WHERE `public`='1' ORDER by `id` DESC";
    $all = simple_queryall($query);
    $result = '';
    if (!empty($all)) {
        foreach ($all as $io => $each) {
            if (!isset($_COOKIE['zbsanread_' . $each['id']])) {
                $readControl = la_Link('?module=announcements&anmarkasread=' . $each['id'], la_img('iconz/anunread.gif', __('Mark as read'))) . ' ';
            } else {
                $readControl = la_Link('?module=announcements&anmarkasunread=' . $each['id'], la_img('iconz/anread.gif', __('Mark as unread'))) . ' ';
            }
            $result .= la_tag('h3', false, 'row1', '') . $readControl . $each['title'] . ' ' . la_tag('h3', true);
            $result .= la_delimiter();
            if ($each['type'] == 'text') {
                $eachtext = strip_tags($each['text']);
                $result .= nl2br($eachtext);
            }
            if ($each['type'] == 'html') {
                $result .= $each['text'];
            }
            $result .= la_delimiter();
        }
    } else {
        show_window(__('Sorry'), __('There are not any announcements.'));
    }
    show_window('', $result);
}
Ejemplo n.º 2
0
 /**
  * anti spam bots dirty magic inputs ;)
  * 
  * @return string
  */
 function zbs_spambotsTrap()
 {
     $result = la_tag('input', false, 'somemagic', 'type="text" name="surname"');
     $result .= la_tag('input', false, '', 'type="text" name="lastname" style="display:none;"');
     $result .= la_tag('input', false, 'somemagic', 'type="text" name="seenoevil"');
     $result .= la_tag('input', false, 'somemagic', 'type="text" name="mobile"');
     return $result;
 }
Ejemplo n.º 3
0
function show_window($title, $data)
{
    global $ContentContainer;
    $cells = la_TableCell(la_tag('h2') . @$title . la_tag('h2', true));
    $rows = la_TableRow($cells);
    $cells = la_TableCell(@$data);
    $rows .= la_TableRow($cells);
    $window_content = la_TableBody($rows, '100%', 0);
    $ContentContainer = $ContentContainer . $window_content;
}
Ejemplo n.º 4
0
/**
 * Returns payment card input form
 * 
 * @return string
 */
function zbs_PaycardsShowForm()
{
    $inputs = la_tag('br');
    $inputs .= __('Payment card number') . ' ';
    $inputs .= la_TextInput('paycard', '', '', false, 25);
    $inputs .= la_Submit(__('Use this card'));
    $inputs .= la_delimiter();
    $form = la_Form('', 'POST', $inputs, '');
    return $form;
}
Ejemplo n.º 5
0
/**
 * returns main self-credit module form
 * 
 * @return string
 */
function zbs_ShowCreditForm()
{
    $inputs = la_tag('center');
    $inputs .= la_HiddenInput('setcredit', 'true');
    $inputs .= la_CheckInput('agree', __('I am sure that I am an adult and have read everything that is written above'), false, false);
    $inputs .= la_delimiter();
    $inputs .= la_Submit(__('Set me credit please'));
    $inputs .= la_tag('center', true);
    $form = la_Form("", 'POST', $inputs, '');
    return $form;
}
Ejemplo n.º 6
0
 /**
  * Renders tariffs list with subscribtion form
  * 
  * @return string
  */
 public function renderSubscribeForm()
 {
     $result = '';
     if (!empty($this->allTariffs)) {
         foreach ($this->allTariffs as $io => $each) {
             $headerColor = $each['primary'] ? '#adc8ff' : '#fff298';
             $tariffInfo = la_tag('div', false, '', 'style="height:32px; width:100%; background-color:' . $headerColor . ';"') . $each['name'] . la_tag('div', true);
             $result .= la_tag('div', false, '', 'style="height:256px; width:256px; border:1px solid; float:left; margin:10px;"') . $tariffInfo . la_tag('div', true);
         }
     }
     return $result;
 }
Ejemplo n.º 7
0
/**
 * Renders user traffic stats report
 * 
 * @param string $login
 * @return string
 */
function zbs_UserTraffStats($login)
{
    $login = vf($login);
    $alldirs = zbs_DirectionsGetAll();
    $monthnames = zbs_months_array_wz();
    /*
     * Current month traffic stats
     */
    $result = la_tag('h3') . __('Current month traffic stats') . la_tag('h3', true);
    $cells = la_TableCell(__('Traffic classes'));
    $cells .= la_TableCell(__('Downloaded'));
    $cells .= la_TableCell(__('Uploaded'));
    $cells .= la_TableCell(__('Total'));
    $rows = la_TableRow($cells, 'row1');
    if (!empty($alldirs)) {
        foreach ($alldirs as $io => $eachdir) {
            $query_downup = "SELECT `D" . $eachdir['rulenumber'] . "`,`U" . $eachdir['rulenumber'] . "` from `users` WHERE `login`='" . $login . "'";
            $downup = simple_query($query_downup);
            $cells = la_TableCell($eachdir['rulename']);
            $cells .= la_TableCell(zbs_convert_size($downup['D' . $eachdir['rulenumber']]));
            $cells .= la_TableCell(zbs_convert_size($downup['U' . $eachdir['rulenumber']]));
            $cells .= la_TableCell(zbs_convert_size($downup['U' . $eachdir['rulenumber']] + $downup['D' . $eachdir['rulenumber']]));
            $rows .= la_TableRow($cells, 'row3');
        }
    }
    $result .= la_TableBody($rows, '100%', 0, '');
    $result .= la_delimiter();
    /*
     * traffic stats by previous months
     */
    $result .= la_tag('h3') . __('Previous month traffic stats') . la_tag('h3', true);
    $cells = la_TableCell(__('Year'));
    $cells .= la_TableCell(__('Month'));
    $cells .= la_TableCell(__('Traffic classes'));
    $cells .= la_TableCell(__('Downloaded'));
    $cells .= la_TableCell(__('Uploaded'));
    $cells .= la_TableCell(__('Total'));
    $cells .= la_TableCell(__('Cash'));
    $rows = la_TableRow($cells, 'row1');
    if (!empty($alldirs)) {
        foreach ($alldirs as $io => $eachdir) {
            $query_prev = "SELECT `D" . $eachdir['rulenumber'] . "`,`U" . $eachdir['rulenumber'] . "`,`month`,`year`,`cash` from `stat` WHERE `login`='" . $login . "'  ORDER BY `year`,`month`";
            $allprevmonth = simple_queryall($query_prev);
            if (!empty($allprevmonth)) {
                foreach ($allprevmonth as $io2 => $eachprevmonth) {
                    $cells = la_TableCell($eachprevmonth['year']);
                    $cells .= la_TableCell(__($monthnames[$eachprevmonth['month']]));
                    $cells .= la_TableCell($eachdir['rulename']);
                    $cells .= la_TableCell(zbs_convert_size($eachprevmonth['D' . $eachdir['rulenumber']]));
                    $cells .= la_TableCell(zbs_convert_size($eachprevmonth['U' . $eachdir['rulenumber']]));
                    $cells .= la_TableCell(zbs_convert_size($eachprevmonth['U' . $eachdir['rulenumber']] + $eachprevmonth['D' . $eachdir['rulenumber']]));
                    $cells .= la_TableCell(round($eachprevmonth['cash'], 2));
                    $rows .= la_TableRow($cells, 'row3');
                }
            }
        }
    }
    $result .= la_TableBody($rows, '100%', 0, '');
    return $result;
}
Ejemplo n.º 8
0
 /**
  * returns custom documents form fields
  * 
  * @return string
  */
 public function customDocumentFieldsForm()
 {
     $rawServices = $this->altcfg['DOCX_SERVICES'];
     $availServices = array();
     if (!empty($rawServices)) {
         $rawServices = explode(',', $rawServices);
         if (!empty($rawServices)) {
             foreach ($rawServices as $io => $each) {
                 $availServices[__($each)] = __($each);
             }
         }
     }
     $inputs = la_DatePickerPreset('customdate', date("Y-m-d"));
     $inputs .= la_tag('br');
     $inputs .= la_TextInput('customrealname', __('Real Name'), @$this->userData[$this->userLogin]['REALNAME'], true, '20');
     $inputs .= la_TextInput('customphone', __('Phone'), @$this->userData[$this->userLogin]['PHONE'], true, '10');
     $inputs .= la_Selector('customservice', $availServices, __('Service'), '', 'true');
     $inputs .= la_TextInput('customnotes', __('Notes'), '', true, '20');
     $inputs .= la_TextInput('customsum', __('Sum'), @$this->userData[$this->userLogin]['TARIFFPRICE'], true, '10');
     $inputs .= la_HiddenInput('customfields', 'true');
     $inputs .= la_Submit(__('Create'));
     $result = la_Form('', 'POST', $inputs, 'glamour');
     return $result;
 }
Ejemplo n.º 9
0
 /**
  * Renders list of available subscribtions
  * 
  * @return string
  */
 public function renderSubscribtions()
 {
     $result = '';
     $iconsPath = zbs_GetCurrentSkinPath($this->usConfig) . 'iconz/';
     if (!empty($this->allSubscribers)) {
         $cells = la_TableCell(__('Date'));
         $cells .= la_TableCell(__('Tariff'));
         $cells .= la_TableCell(__('Active'));
         $cells .= la_TableCell(__('Primary'));
         $cells .= la_TableCell(__('Free period'));
         $rows = la_TableRow($cells, 'row1');
         foreach ($this->allSubscribers as $io => $each) {
             if ($each['login'] == $this->userLogin) {
                 $freePeriodFlag = $each['freeperiod'] ? la_img($iconsPath . 'anread.gif') : la_img($iconsPath . 'anunread.gif');
                 $primaryFlag = $each['primary'] ? la_img($iconsPath . 'anread.gif') : la_img($iconsPath . 'anunread.gif');
                 $activeFlag = $each['active'] ? la_img($iconsPath . 'anread.gif') : la_img($iconsPath . 'anunread.gif');
                 $cells = la_TableCell($each['actdate']);
                 $cells .= la_TableCell(@$this->allTariffs[$each['tariffid']]['name']);
                 $cells .= la_TableCell($activeFlag);
                 $cells .= la_TableCell($primaryFlag);
                 $cells .= la_TableCell($freePeriodFlag);
                 $rows .= la_TableRow($cells, 'row2');
             }
         }
         $result = la_TableBody($rows, '100%', 0);
         $result .= la_tag('br');
         $result .= __('To view the purchased subscription register or log in to Megogo.net, by clicking the button below');
     }
     return $result;
 }
Ejemplo n.º 10
0
/**
 * Returns complete tariff moving form
 * 
 * @param string $login
 * @param array  $tc_tariffsallowed
 * @param float  $tc_priceup
 * @param float  $tc_pricedown
 * @param float  $tc_pricesimilar
 * @param string $us_currency
 * @return string
 */
function zbs_TariffChangeForm($login, $tc_tariffsallowed, $tc_priceup, $tc_pricedown, $tc_pricesimilar, $us_currency)
{
    global $us_config;
    $user_tariff = zbs_UserGetTariff($login);
    $alltariffs = zbs_TariffGetAllPrices();
    $form = '
        ' . __('Your current tariff is') . ': ' . __($user_tariff) . ' ' . __('with monthly fee') . ' ' . $alltariffs[$user_tariff] . ' ' . $us_currency . '<br>
        ' . __('The cost of switching to a lower rate monthly fee') . ': ' . $tc_pricedown . ' ' . $us_currency . '<br>
        ' . __('The cost of switching to a higher monthly fee tariff') . ': ' . $tc_priceup . ' ' . $us_currency . '<br>
        ' . __('The cost of the transition rate for the same monthly fee') . ': ' . $tc_pricesimilar . ' ' . $us_currency . '<br>
        ' . la_tag('br') . '
        ' . zbs_TariffGetShowPrices($tc_tariffsallowed, $us_currency, $user_tariff, $tc_priceup, $tc_pricedown, $tc_pricesimilar) . '
        ' . la_tag('br') . '
        ';
    $inputs = __('New tariff') . ' ' . zbs_TariffSelector($tc_tariffsallowed, $user_tariff) . la_delimiter();
    $inputs .= la_CheckInput('agree', __('I am sure that I am an adult and have read everything that is written above'), false, false);
    $inputs .= la_delimiter();
    $nmChangeFlag = true;
    if (isset($us_config['TC_RIGHTNOW'])) {
        if ($us_config['TC_RIGHTNOW']) {
            $nmChangeFlag = false;
        }
    }
    $sumbitLabel = $nmChangeFlag ? __('I want this tariff next month') : __('I want this tariff right now');
    $inputs .= la_Submit($sumbitLabel);
    $form .= la_Form('', 'POST', $inputs, '');
    return $form;
}
Ejemplo n.º 11
0
    //extracting paysys description
    if (file_exists('config/opayz.ini')) {
        $opz_config = parse_ini_file('config/opayz.ini');
    } else {
        $opz_config = array();
    }
    $inputs = '';
    $forms = '';
    if (!empty($paysys)) {
        foreach ($paysys as $eachpaysys) {
            if (isset($opz_config[$eachpaysys])) {
                $paysys_desc = $opz_config[$eachpaysys];
            } else {
                $paysys_desc = '';
            }
            $inputs = la_tag('center', false);
            $inputs .= la_HiddenInput('customer_id', $payid);
            $inputs .= la_Submit(strtoupper($eachpaysys));
            $inputs .= la_tag('br');
            $inputs .= $paysys_desc;
            $inputs .= la_tag('center', true);
            $inputs .= la_tag('br');
            $forms .= la_Form($us_config['OPENPAYZ_URL'] . $eachpaysys . '/', 'GET', $inputs, '');
        }
        show_window('', $forms);
    } else {
        show_window(__('Sorry'), __('No available payment systems'));
    }
} else {
    show_window(__('Sorry'), __('Unfortunately online payments are disabled'));
}
Ejemplo n.º 12
0
 /**
  * 
  * @return type form for changin mobile
  */
 function zbs_ShowChangeMobileForm()
 {
     global $us_config;
     $inputs = la_tag('center');
     $inputs .= la_HiddenInput('changemobile', 'true');
     $inputs .= @$us_config['REMINDER_PREFIX'] . ' ';
     $inputs .= la_TextInput('mobile');
     $inputs .= la_delimiter();
     $inputs .= la_Submit(__('Change mobile'));
     $inputs .= la_tag('center', true);
     $form = la_Form("", 'POST', $inputs, '');
     return $form;
 }
Ejemplo n.º 13
0
if ($us_config['SP_ENABLED']) {
    $spurl = $us_config['SP_URL'];
    $template = la_tag('div', false, '', 'style="clear: both;"') . la_tag('div', true);
    $template .= la_tag('center', false);
    $template .= '
        <!-- BEGIN SPEED TEST - DO NOT ALTER BELOW-->
        <script type="text/javascript" src="' . $spurl . 'speedtest/swfobject.js?v=2.2"></script>
	<div id="mini-demo">
	 Speedtest.net Mini requires at least version 8 of Flash. Please <a href="http://get.adobe.com/flashplayer/">update your client</a>.
	 </div><!--/mini-demo-->
	<script type="text/javascript">
	 var flashvars = {
	     upload_extension: "php"
	   };
	  var params = {
		wmode: "transparent",
		quality: "high",
		menu: "false",
		allowScriptAccess: "always"
		};
		var attributes = {};
		swfobject.embedSWF("' . $spurl . 'speedtest.swf?v=2.1.8", "mini-demo", "350", "200", "9.0.0", "' . $spurl . 'speedtest/expressInstall.swf", flashvars, params, attributes);
	</script>
        <!-- END SPEED TEST - DO NOT ALTER ABOVE -->
          ';
    $template .= la_tag('center', true);
    $notice = la_delimiter() . __('The test may not be accurate and is dependent on the type and configuration of client software. The results of tests can influence the type of browser settings firewall, flash player, active anti-virus scanning of HTTP traffic function, active downloads, etc');
    show_window(__('Speed test'), $template . $notice);
} else {
    show_window(__('Sorry'), __('Unfortunately speedtest is now disabled'));
}
Ejemplo n.º 14
0
<?php

$user_ip = zbs_UserDetectIp('debug');
$user_login = zbs_UserGetLoginByIp($user_ip);
$us_config = zbs_LoadConfig();
if ($us_config['ZL_ENABLED']) {
    $zl_options = $us_config['ZL_OPTIONS'];
    if (!empty($zl_options)) {
        $zl_options = explode(',', $zl_options);
        $rows = '';
        if (!empty($zl_options)) {
            foreach ($zl_options as $eachlink) {
                $ldata = explode('|', $eachlink);
                $icon = $ldata[0];
                $url = $ldata[1];
                $title = $ldata[2];
                $cells = la_TableCell(la_Link($url, la_img($icon)));
                $cells .= la_TableCell(la_tag('h3') . la_Link($url, $title) . la_tag('h3', true));
                $rows .= la_TableRow($cells);
            }
        }
        $result = la_TableBody($rows, '', 0);
        show_window(__('Downloads'), $result);
    }
} else {
    show_window(__('Sorry'), __('Unfortunately downloads are now disabled'));
}
Ejemplo n.º 15
0
/**
 *
 * Return Jquery UI selectable combobox
 *
 * @param   $name name of element
 * @param   $params array of elements $value=>$option
 * @param   $label text label for input
 * @param   $selected selected $value for selector (now ignored)
 * @param   $br append new line - bool
 * @return  string
 *
 */
function la_JuiComboBox($name, $params, $label, $selected = '', $br = false)
{
    $id = la_InputId();
    $select = '';
    if (!empty($params)) {
        foreach ($params as $io => $each) {
            $select .= '<option value="' . $io . '">' . $each . '</option>' . "\n";
        }
    }
    $result = '

 <style>
.custom-combobox_' . $id . ' {
position: relative;
display: inline-block;
}
.custom-combobox-toggle_' . $id . ' {
position: absolute;
top: 0;
bottom: 0;
margin-left: -1px;
padding: 0;
}
.custom-combobox-input_' . $id . ' {
margin: 0;
padding: 5px 10px;
}

.ui-autocomplete {
    max-height: 400px;
    overflow-y: auto;   /* prevent horizontal scrollbar */
    overflow-x: hidden; /* add padding to account for vertical scrollbar */
    z-index:1000 !important;
}
</style>
<script>
(function( $ ) {
$.widget( "custom.combobox_' . $id . '", {
_create: function() {
this.wrapper = $( "<span>" )
.addClass( "custom-combobox_' . $id . '" )
.insertAfter( this.element );
this.element.hide();
this._createAutocomplete();
this._createShowAllButton();
},
_createAutocomplete: function() {
var selected = this.element.children( ":selected" ),
value = selected.val() ? selected.text() : "";
this.input = $( "<input>" )
.appendTo( this.wrapper )
.val( value )
.attr( "title", "" )
.addClass( "custom-combobox-input_' . $id . ' ui-widget_' . $id . ' ui-widget-content ui-state-default ui-corner-left" )
.autocomplete({
delay: 0,
minLength: 0,
source: $.proxy( this, "_source" )
})
.tooltip({
tooltipClass: "ui-state-highlight"
});
this._on( this.input, {
autocompleteselect: function( event, ui ) {
ui.item.option.selected = true;
this._trigger( "select", event, {
item: ui.item.option
});
},
autocompletechange: "_removeIfInvalid"
});
},
_createShowAllButton: function() {
var input = this.input,
wasOpen = false;
$( "<a>" )
.attr( "tabIndex", -1 )
.attr( "title", "' . __('Show all') . '" )
.tooltip()
.appendTo( this.wrapper )
.button({
icons: {
primary: "ui-icon-triangle-1-s"
},
text: false
})
.removeClass( "ui-corner-all" )
.addClass( "custom-combobox-toggle_' . $id . ' ui-corner-right" )
.mousedown(function() {
wasOpen = input.autocomplete( "widget" ).is( ":visible" );
})
.click(function() {
input.focus();
// Close if already visible
if ( wasOpen ) {
return;
}
// Pass empty string as value to search for, displaying all results
input.autocomplete( "search", "" );
});
},
_source: function( request, response ) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
response( this.element.children( "option" ).map(function() {
var text = $( this ).text();
if ( this.value && ( !request.term || matcher.test(text) ) )
return {
label: text,
value: text,
option: this
};
}) );
},
_removeIfInvalid: function( event, ui ) {
// Selected an item, nothing to do
if ( ui.item ) {
return;
}
// Search for a match (case-insensitive)
var value = this.input.val(),
valueLowerCase = value.toLowerCase(),
valid = false;
this.element.children( "option" ).each(function() {
if ( $( this ).text().toLowerCase() === valueLowerCase ) {
this.selected = valid = true;
return false;
}
});
// Found a match, nothing to do
if ( valid ) {
return;
}

this.input.autocomplete( "instance" ).term = "";
},
_destroy: function() {
this.wrapper.remove();
this.element.show();
}
});
})( jQuery );

$(function() {
$( "#combobox_' . $id . '" ).combobox_' . $id . '();
});
</script>


<div class="ui-widget_' . $id . '">
<label for="combobox_' . $id . '">' . $label . '</label>
<select id="combobox_' . $id . '" name=' . $name . '>
' . $select . '
</select>
</div>
';
    if ($br) {
        $result .= la_tag('br');
    }
    return $result;
}
Ejemplo n.º 16
0
         // freezing subroutine
         if (isset($_POST['dofreeze'])) {
             if (isset($_POST['afagree'])) {
                 //all ok, lets freeze account
                 billing_freeze($user_login);
                 //push cash fee anyway
                 zbs_PaymentLog($user_login, '-' . $freezeprice, $af_cahtypeid, "AFFEE");
                 billing_addcash($user_login, '-' . $freezeprice);
                 rcms_redirect("index.php");
             } else {
                 show_window(__('Error'), __('You must accept our policy'));
             }
         } else {
             //show some forms and notices
             $af_message = __('Service "account freeze" will allow you to suspend the charge of the monthly fee during your long absence - such as holidays or vacations. The cost of this service is:') . ' ';
             $af_message .= la_tag('b') . $freezeprice . ' ' . $af_currency . la_tag('b', true) . '. ';
             $af_message .= __('Be aware that access to the network will be limited to immediately after you confirm your desire to freeze the account. To unfreeze the account you need to contact the nearest office.');
             // terms of service
             show_window(__('Account freezing'), $af_message);
             //account freezing form
             $inputs = la_CheckInput('afagree', __('I am sure that I am an adult and have read everything that is written above'), false, false);
             $inputs .= la_HiddenInput('dofreeze', 'true');
             $inputs .= la_delimiter();
             $inputs .= la_Submit(__('I want to freeze my account right now'));
             $af_form = la_Form('', 'POST', $inputs);
             show_window('', $af_form);
         }
     } else {
         show_window('', __('Your account has been frozen'));
     }
 } else {
Ejemplo n.º 17
0
 /**
  * returns signup service main form
  * 
  * @retun string
  */
 public function renderForm()
 {
     $inputs = '';
     $inputs .= la_HiddenInput('createrequest', 'true');
     //greeting text
     $inputs .= $this->optionGreetingText;
     //optional city selector
     if ($this->optionCityDisplay) {
         $inputs .= $this->cityInput();
         $inputs .= la_tag('br');
     }
     //street selector
     $inputs .= $this->streetInput();
     //build and apt inputs
     $baCells = la_TableCell($this->buildInput());
     $baCells .= la_TableCell($this->aptInput());
     $baRows = la_TableRow($baCells);
     $inputs .= la_TableBody($baRows, '', 0, '');
     //realname input
     $inputs .= $this->realnameInput();
     $inputs .= la_tag('br');
     //dirty magic here
     if ($this->optionSpamTraps) {
         $inputs .= $this->spambotsTrap();
     }
     //phone input
     $inputs .= $this->phoneInput();
     //email optional input
     if ($this->optionEmailDisplay) {
         $inputs .= $this->emailInput();
         $inputs .= la_tag('br');
     }
     //service combo selector
     if (!empty($this->services)) {
         $inputs .= $this->serviceInput();
         $inputs .= la_tag('br');
     }
     //optional tariffs selector
     if (!empty($this->tariffs)) {
         $inputs .= $this->tariffsInput();
         $inputs .= la_tag('br');
     }
     //notes text area
     $inputs .= $this->notesInput();
     $inputs .= la_tag('br');
     $inputs .= la_tag('small') . __('All fields marked with an asterisk (*) are required') . la_tag('small', true);
     $inputs .= la_tag('br');
     $inputs .= la_tag('br');
     $inputs .= la_Submit(__('Send signup request'));
     $result = la_tag('div', false, '', 'id="signup_form"');
     $result .= la_Form("", 'POST', $inputs, '');
     $result .= la_tag('div', true);
     return $result;
 }
Ejemplo n.º 18
0
         if (checkTask($user_login, $action, $param)) {
             createTask($date, $user_login, $action, $param, $note);
         }
         rcms_redirect('?module=adservice&action=delete&wait=true');
     }
 }
 if (isset($_GET['accept']) and isset($_GET['service'])) {
     foreach ($customAcceptData as $eachData) {
         $customRules = explode(",", $eachData);
         if ($customRules[0] == $_GET['service']) {
             $url = $customRules[1];
         }
     }
     if (!empty($url)) {
         $show_pdf = la_tag('iframe src="' . $url . '" width="600px" height="800px"');
         $show_pdf .= la_tag('iframe', true);
         $inputs = la_CheckInput('custom_agreement', __('I have read text above and agree with terms of use'), FALSE, FALSE);
         $inputs .= la_delimiter();
         $inputs .= la_Submit(__('Order'));
         $show_pdf .= la_Form("", "POST", $inputs);
         show_window(__("You must accept license agreement"), $show_pdf);
     }
     if (isset($_POST['custom_agreement'])) {
         $date = GetFullApplyDate();
         $action = 'tagadd';
         $param = vf($_GET['service'], 3);
         $param = preg_replace('/\\0/s', '', $param);
         $param = strip_tags($param);
         $param = mysql_real_escape_string($param);
         $note = 'Order from userstats';
         if (checkTask($user_login, $action, $param)) {
Ejemplo n.º 19
0
            }
        }
        //  try unsubscribe service
        if (la_CheckGet(array('unsubscribe'))) {
            $unsubscribeResult = $megogo->pushUnsubscribeRequest($_GET['unsubscribe']);
            if (!$unsubscribeResult) {
                rcms_redirect('?module=megogo');
            } else {
                show_window(__('Sorry'), __($unsubscribeResult));
            }
        }
        //view button if is some subscriptions here
        if ($megogo->haveSubscribtions()) {
            show_window(__('Your subscriptions'), $megogo->renderSubscribtions());
            show_window('', la_Link($megogo->getAuthButtonURL(), __('Go to MEGOGO'), true, 'mgviewcontrol'));
            show_window('', la_tag('br'));
        }
        //default sub/unsub form
        show_window(__('Available subscribtions'), $megogo->renderSubscribeForm());
        //user guide link
        if (isset($us_config['MG_GUIDE_URL'])) {
            if (!empty($us_config['MG_GUIDE_URL'])) {
                show_window('', la_Link($us_config['MG_GUIDE_URL'], __('Instructions for subscription'), false, 'mgguidecontrol'));
            }
        }
    } else {
        show_window(__('Sorry'), __('You can not use this service'));
    }
} else {
    show_window(__('Sorry'), __('This module is disabled'));
}