25 return ((
float)$a_vat != floor((
float)$a_vat) ?
26 self::_formatFloat((
float)$a_vat) :
42 return number_format((
float)$a_float, $a_num_decimals, $lng->txt(
'lang_sep_decimal'), $lng->txt(
'lang_sep_thousand'));
55 $reg =
'/^([0]|([1-9][0-9]*))([\.,][0-9][0-9]*)?$/';
56 return preg_match($reg, $a_vat_rate);
70 $payment_vat_admins = $ilSetting->get(
'payment_vat_admins');
71 $users = explode(
',', $payment_vat_admins);
73 $subject = $lng->txt(
'payment_vat_assignment_notification_subject');
75 $message = sprintf($lng->txt(
'payment_vat_assignment_notification_body'), $tmp_obj->getTitle()).
"\n\n";
76 $message .=
"------------------------------------------------------------\n";
77 $message .= sprintf($lng->txt(
'payment_vat_assignment_notification_intro'),
78 $ilClientIniFile->readVariable(
'client',
'name'),
79 ILIAS_HTTP_PATH.
'/?client_id='.CLIENT_ID);
81 include_once
'Services/Mail/classes/class.ilMail.php';
82 $mail_obj =
new ilMail(ANONYMOUS_USER_ID);
83 foreach((array)$users as $login)
85 if(strlen(trim($login)) &&
88 $success = $mail_obj->sendMail(trim($login),
'',
'',
90 array(),array(
"system"));
99 if(
$_SESSION[
'create_user_account'] != NULL)
107 $userLogin = array();
108 $res = $ilDB->query(
'SELECT sequence FROM object_data_seq');
111 $temp_user_id = (int)
$row[
'sequence'] + 1;
113 $userLogin[
'login'] =
'shop_user_'.$temp_user_id;
117 require_once
'Services/User/classes/class.ilObjUser.php';
118 include_once(
"Services/Mail/classes/class.ilAccountMail.php");
121 $obj_user->setId($temp_user_id);
123 $obj_user->setLogin($userLogin[
'login']);
124 $obj_user->setPasswd((
string)$userLogin[
'passwd'][0],
IL_PASSWD_PLAIN);
126 $_SESSION[
'tmp_user_account'][
'login'] = $userLogin[
'login'];
127 $_SESSION[
'tmp_user_account'][
'passwd'] = $userLogin[
'passwd'];
129 $obj_user->setFirstname($keyarray[
'first_name']);
130 $obj_user->setLastname($keyarray[
'last_name']);
131 $obj_user->setEmail($keyarray[
'payer_email']);
132 # $obj_user->setEmail('nkrzywon@databay.de');
134 $obj_user->setGender(
'f');
135 $obj_user->setLanguage( $ilSetting->get(
"language"));
136 $obj_user->setActive(
true);
137 $obj_user->setTimeLimitUnlimited(
true);
139 $obj_user->setTitle($obj_user->getFullname());
140 $obj_user->setDescription($obj_user->getEmail());
141 $obj_user->setTimeLimitOwner(7);
142 $obj_user->setTimeLimitUnlimited(1);
143 $obj_user->setTimeLimitMessage(0);
144 $obj_user->setApproveDate(date(
"Y-m-d H:i:s"));
147 $obj_user->setPref(
'hits_per_page',$ilSetting->get(
'hits_per_page',30));
148 $obj_user->setPref(
'show_users_online',$ilSetting->get(
'show_users_online',
'y'));
149 $obj_user->writePrefs();
152 $obj_user->setProfileIncomplete(
true);
154 $obj_user->saveAsNew();
160 include_once(
"./Services/AccessControl/classes/class.ilObjRole.php");
162 $user_role = $reg_allowed[0][
'id'];
167 $rbacadmin->assignUser((
int)$user_role, $obj_user->getId(),
true);
169 include_once
"Services/Mail/classes/class.ilMimeMail.php";
172 $settings = $ilias->getAllSettings();
174 $mmail->autoCheck(
false);
175 $mmail->From($settings[
"admin_email"]);
176 $mmail->To($obj_user->getEmail());
179 $subject = $lng->txt(
"reg_mail_subject");
182 $body = $lng->txt(
"reg_mail_body_salutation").
" ".$obj_user->getFullname().
",\n\n".
183 $lng->txt(
"reg_mail_body_text1").
"\n\n".
184 $lng->txt(
"reg_mail_body_text2").
"\n".
185 ILIAS_HTTP_PATH.
"/login.php?client_id=".$ilias->client_id.
"\n";
186 $body .= $lng->txt(
"login").
": ".$obj_user->getLogin().
"\n";
189 $body.= $lng->txt(
"passwd").
": ".$userLogin[
'passwd'][0].
"\n";
193 $body .= ($lng->txt(
"reg_mail_body_text3").
"\n\r");
194 $body .= $obj_user->getProfileAsString($lng);
195 $mmail->Subject($subject);
199 $_SESSION[
'create_user_account'] = $obj_user->getId();
208 $res = $ilDB->manipulateF(
'
209 UPDATE payment_statistic
211 WHERE customer_id = %s
212 AND transaction_extern = %s',
213 array(
'integer',
'integer',
'text'),
214 array($a_new_user_id, $a_old_user_id, $a_transaction_extern));
227 $tmp_usr->addDesktopItem($oPaymentObject->getRefId(),$type);
232 $ilUser->addDesktopItem($oPaymentObject->getRefId(),$type);
239 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
262 $detail_link =
'ilias.php?baseClass=ilSAHSPresentationGUI&ref_id='.$a_ref_id;
266 $detail_link =
'ilias.php?baseClass=ilLMPresentationGUI&ref_id='.$a_ref_id;
269 $detail_link = $ilCtrl->getLinkTargetByClass(
"ilShopPurchaseGUI",
"showDetails").
'&ref_id='.$a_ref_id;
273 $detail_link = $ilCtrl->getLinkTargetByClass(
"ilShopPurchaseGUI",
"showDetails").
'&ref_id='.$a_ref_id;
276 $img =
ilUtil::img(
'./templates/default/images/payment/shopcart_add_32.png');
277 $link =
'<a href="'.$detail_link.
'">'.
$img.
'</a>';
284 #$link = '<a href="'.$detail_link.'">'.$img.'</a>';
296 case 'PAY_METHOD_BILL':
return '';
302 case 'PAY_METHOD_BMF':
return '';
308 case 'PAY_METHOD_PAYPAL':
return ilUtil::img(
'./templates/default/images/payment/paypal_48.png');
314 case 'PAY_METHOD_EPAY':
return '';
316 case 'PAY_METHOD_NOT_SPECIFIED':
return '';
328 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';