コード例 #1
0
ファイル: api.documents.php プロジェクト: nightflyza/Ubilling
 /**
  * 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;
 }
コード例 #2
0
ファイル: index.php プロジェクト: nightflyza/Ubilling
 /**
  * Forms and returns selector with available services
  * 
  * @param array $availableServices
  * @param string $login
  * @return string
  */
 function AdServicesSelector($availableServices, $login)
 {
     $selectData['-'] = '-';
     if (!empty($availableServices)) {
         $allSheduled = GetAllSheduled($availableServices, $login);
         $allActivated = GetAllActivated($availableServices, $login);
         foreach ($availableServices as $eachService) {
             $eq = false;
             $eachData = explode(":", $eachService);
             $serviceName = $eachData[0];
             $serviceTagID = $eachData[1];
             if (!empty($allSheduledl)) {
                 foreach ($allSheduled as $eachShedule) {
                     if ($eachShedule['param'] === $serviceTagID) {
                         $eq = true;
                     }
                 }
             }
             if (!empty($allActivated)) {
                 foreach ($allActivated as $eachActivated) {
                     if ($eachActivated['tagid'] === $serviceTagID) {
                         $eq = true;
                     }
                 }
             }
             if (!$eq) {
                 $selectData[$serviceTagID] = $serviceName;
             }
         }
     }
     $selector = la_Selector('tagid', $selectData, '', '', false);
     $selector .= la_delimiter();
     $selector .= la_CheckInput('agree', __('I am sure that I am an adult and have read everything that is written above'), false, false);
     $selector .= la_delimiter();
     $selector .= la_Submit(__('Order'));
     $form = la_Form('', 'POST', $selector);
     return $form;
 }
コード例 #3
0
ファイル: index.php プロジェクト: l1ght13aby/Ubilling
/**
 * Returns selector of allowed tariffs to move, except current tariff
 * 
 * @param string $tc_tariffsallowed
 * @param string $user_tariff
 * @return string
 */
function zbs_TariffSelector($tc_tariffsallowed, $user_tariff)
{
    $params = array();
    if (!empty($tc_tariffsallowed)) {
        foreach ($tc_tariffsallowed as $io => $eachtariff) {
            if ($eachtariff != $user_tariff) {
                $params[trim($eachtariff)] = __($eachtariff);
            }
        }
    }
    $result = la_Selector('newtariff', $params, '', '', false);
    return $result;
}