@@ -121,19 +121,19 @@ |
||
| 121 | 121 | if (class_exists('tidy')) { |
| 122 | 122 | $tidy = new tidy(); |
| 123 | 123 | $tidyOptions = ['output-xhtml' => true, |
| 124 | - 'show-body-only' => true, |
|
| 125 | - 'clean' => true, |
|
| 126 | - 'wrap' => '350', |
|
| 127 | - 'indent' => true, |
|
| 128 | - 'indent-spaces' => 1, |
|
| 129 | - 'ascii-chars' => false, |
|
| 130 | - 'wrap-attributes' => false, |
|
| 131 | - 'alt-text' => '', |
|
| 132 | - 'doctype' => 'loose', |
|
| 133 | - 'numeric-entities' => true, |
|
| 134 | - 'drop-proprietary-attributes' => true, |
|
| 135 | - 'enclose-text' => false, |
|
| 136 | - 'enclose-block-text' => false, |
|
| 124 | + 'show-body-only' => true, |
|
| 125 | + 'clean' => true, |
|
| 126 | + 'wrap' => '350', |
|
| 127 | + 'indent' => true, |
|
| 128 | + 'indent-spaces' => 1, |
|
| 129 | + 'ascii-chars' => false, |
|
| 130 | + 'wrap-attributes' => false, |
|
| 131 | + 'alt-text' => '', |
|
| 132 | + 'doctype' => 'loose', |
|
| 133 | + 'numeric-entities' => true, |
|
| 134 | + 'drop-proprietary-attributes' => true, |
|
| 135 | + 'enclose-text' => false, |
|
| 136 | + 'enclose-block-text' => false, |
|
| 137 | 137 | |
| 138 | 138 | ]; |
| 139 | 139 | $tidy->parseString($string, $tidyOptions, 'utf8'); |
@@ -177,7 +177,7 @@ |
||
| 177 | 177 | |
| 178 | 178 | return self::$filterClass->basic($value); |
| 179 | 179 | } |
| 180 | - throw new Error('Invalid security mode:' + $mode); |
|
| 180 | + throw new Error('Invalid security mode:' +$mode); |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | public static function CSRF_detected() |
@@ -190,6 +190,9 @@ |
||
| 190 | 190 | die(); |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | + /** |
|
| 194 | + * @param boolean $edit |
|
| 195 | + */ |
|
| 193 | 196 | public static function checkCSRF($edit) |
| 194 | 197 | { |
| 195 | 198 | if (self::$security_key) { |
@@ -229,7 +229,7 @@ |
||
| 229 | 229 | $this->request->set_limit(0, 0); //netralize default reaction on dyn. loading mode |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | - /*! renders self as xml, starting part |
|
| 232 | + /*! renders self as xml, starting part |
|
| 233 | 233 | */ |
| 234 | 234 | public function xml_start() |
| 235 | 235 | { |
@@ -210,7 +210,6 @@ discard block |
||
| 210 | 210 | /** |
| 211 | 211 | * Remove the specified resource from storage. |
| 212 | 212 | * |
| 213 | - * @param int $id |
|
| 214 | 213 | * |
| 215 | 214 | * @return Response |
| 216 | 215 | */ |
@@ -432,6 +431,10 @@ discard block |
||
| 432 | 431 | } |
| 433 | 432 | } |
| 434 | 433 | |
| 434 | + /** |
|
| 435 | + * @param integer $cart |
|
| 436 | + * @param integer $shop |
|
| 437 | + */ |
|
| 435 | 438 | public function taxProcess($taxes, $price, $cart, $shop) |
| 436 | 439 | { |
| 437 | 440 | try { |
@@ -127,14 +127,14 @@ discard block |
||
| 127 | 127 | public function GetTemplates() |
| 128 | 128 | { |
| 129 | 129 | return \Datatable::collection($this->template->select('id', 'name', 'type')->get()) |
| 130 | - ->addColumn('#', function ($model) { |
|
| 130 | + ->addColumn('#', function($model) { |
|
| 131 | 131 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 132 | 132 | }) |
| 133 | 133 | ->showColumns('name') |
| 134 | - ->addColumn('type', function ($model) { |
|
| 134 | + ->addColumn('type', function($model) { |
|
| 135 | 135 | return $this->type->where('id', $model->type)->first()->name; |
| 136 | 136 | }) |
| 137 | - ->addColumn('action', function ($model) { |
|
| 137 | + ->addColumn('action', function($model) { |
|
| 138 | 138 | return '<a href='.url('templates/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
| 139 | 139 | }) |
| 140 | 140 | ->searchColumns('name') |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | $settings = \App\Model\Common\Setting::find(1); |
| 270 | 270 | $fromname = $settings->company; |
| 271 | 271 | |
| 272 | - \Mail::send('emails.mail', ['data' => $data], function ($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) { |
|
| 272 | + \Mail::send('emails.mail', ['data' => $data], function($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) { |
|
| 273 | 273 | $m->from($from, $fromname); |
| 274 | 274 | |
| 275 | 275 | $m->to($to, $toname)->subject($subject); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | ->select('number', 'created_at', 'grand_total', 'id', 'status'); |
| 57 | 57 | |
| 58 | 58 | return \Datatable::query($invoices) |
| 59 | - ->addColumn('number', function ($model) { |
|
| 59 | + ->addColumn('number', function($model) { |
|
| 60 | 60 | return $model->number; |
| 61 | 61 | }) |
| 62 | 62 | // ->addColumn('created_at', function ($model) { |
@@ -64,10 +64,10 @@ discard block |
||
| 64 | 64 | // return date_format($date,'l, F j, Y H:m A'); |
| 65 | 65 | // }) |
| 66 | 66 | ->showColumns('created_at') |
| 67 | - ->addColumn('total', function ($model) { |
|
| 67 | + ->addColumn('total', function($model) { |
|
| 68 | 68 | return $model->grand_total; |
| 69 | 69 | }) |
| 70 | - ->addColumn('action', function ($model) { |
|
| 70 | + ->addColumn('action', function($model) { |
|
| 71 | 71 | $status = $model->status; |
| 72 | 72 | $payment = ''; |
| 73 | 73 | if ($status == 'Pending' && $model->grand_total > 0) { |
@@ -101,10 +101,10 @@ discard block |
||
| 101 | 101 | //->select('id','product','created_at') |
| 102 | 102 | |
| 103 | 103 | return \Datatable::query($orders) |
| 104 | - ->addColumn('id', function ($model) { |
|
| 104 | + ->addColumn('id', function($model) { |
|
| 105 | 105 | return $model->id; |
| 106 | 106 | }) |
| 107 | - ->addColumn('product', function ($model) { |
|
| 107 | + ->addColumn('product', function($model) { |
|
| 108 | 108 | return $model->product()->first()->name; |
| 109 | 109 | }) |
| 110 | 110 | // ->addColumn('created_at', function ($model) { |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | // return date_format($date,'l, F j, Y H:m A'); |
| 113 | 113 | // }) |
| 114 | 114 | //->showColumns('created_at') |
| 115 | - ->addColumn('created_at', function ($model) { |
|
| 115 | + ->addColumn('created_at', function($model) { |
|
| 116 | 116 | $end = '--'; |
| 117 | 117 | if ($model->subscription()->first()) { |
| 118 | 118 | if ($end != '0000-00-00 00:00:00' || $end != null) { |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | return $end; |
| 126 | 126 | //return $end; |
| 127 | 127 | }) |
| 128 | - ->addColumn('action', function ($model) { |
|
| 128 | + ->addColumn('action', function($model) { |
|
| 129 | 129 | $sub = $model->subscription()->first(); |
| 130 | 130 | $order_cont = new \App\Http\Controllers\Order\OrderController(); |
| 131 | 131 | $status = $order_cont->checkInvoiceStatusByOrderId($model->id); |
@@ -163,11 +163,11 @@ discard block |
||
| 163 | 163 | $subscriptions = $this->subscription->where('user_id', \Auth::user()->id)->get(); |
| 164 | 164 | |
| 165 | 165 | return \Datatable::collection($subscriptions) |
| 166 | - ->addColumn('id', function ($model) { |
|
| 166 | + ->addColumn('id', function($model) { |
|
| 167 | 167 | return $model->id; |
| 168 | 168 | }) |
| 169 | 169 | ->showColumns('created_at') |
| 170 | - ->addColumn('ends_at', function ($model) { |
|
| 170 | + ->addColumn('ends_at', function($model) { |
|
| 171 | 171 | return $model->subscription()->first()->ends_at; |
| 172 | 172 | }) |
| 173 | 173 | ->searchColumns('id', 'created_at', 'ends_at') |
@@ -287,27 +287,27 @@ discard block |
||
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | return \Datatable::query($invoices) |
| 290 | - ->addColumn('number', function ($model) { |
|
| 290 | + ->addColumn('number', function($model) { |
|
| 291 | 291 | return $model->number; |
| 292 | 292 | }) |
| 293 | - ->addColumn('invoice_item', function ($model) { |
|
| 293 | + ->addColumn('invoice_item', function($model) { |
|
| 294 | 294 | $invoice = $this->invoice->find($model->id); |
| 295 | 295 | $products = $invoice->invoiceItem()->lists('product_name')->toArray(); |
| 296 | 296 | |
| 297 | 297 | return ucfirst(implode(',', $products)); |
| 298 | 298 | }) |
| 299 | - ->addColumn('created_at', function ($model) { |
|
| 299 | + ->addColumn('created_at', function($model) { |
|
| 300 | 300 | $date = date_create($model->created_at); |
| 301 | 301 | |
| 302 | 302 | return date_format($date, 'l, F j, Y H:m A'); |
| 303 | 303 | }) |
| 304 | - ->addColumn('total', function ($model) { |
|
| 304 | + ->addColumn('total', function($model) { |
|
| 305 | 305 | return $model->grand_total; |
| 306 | 306 | }) |
| 307 | - ->addColumn('status', function ($model) { |
|
| 307 | + ->addColumn('status', function($model) { |
|
| 308 | 308 | return ucfirst($model->status); |
| 309 | 309 | }) |
| 310 | - ->addColumn('action', function ($model) { |
|
| 310 | + ->addColumn('action', function($model) { |
|
| 311 | 311 | if (\Auth::user()->role == 'admin') { |
| 312 | 312 | $url = '/invoices/show?invoiceid='.$model->id; |
| 313 | 313 | } else { |
@@ -338,16 +338,16 @@ discard block |
||
| 338 | 338 | ->select('id', 'invoice_id', 'user_id', 'amount', 'payment_method', 'payment_status', 'created_at'); |
| 339 | 339 | //dd(\Input::all()); |
| 340 | 340 | return \Datatable::query($payments) |
| 341 | - ->addColumn('#', function ($model) { |
|
| 341 | + ->addColumn('#', function($model) { |
|
| 342 | 342 | if (\Input::get('client') != 'true') { |
| 343 | 343 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 344 | 344 | } |
| 345 | 345 | }) |
| 346 | - ->addColumn('number', function ($model) { |
|
| 346 | + ->addColumn('number', function($model) { |
|
| 347 | 347 | return $model->invoice()->first()->number; |
| 348 | 348 | }) |
| 349 | 349 | ->showColumns('amount', 'payment_method', 'payment_status', 'created_at') |
| 350 | - ->addColumn('total', function ($model) { |
|
| 350 | + ->addColumn('total', function($model) { |
|
| 351 | 351 | return $model->grand_total; |
| 352 | 352 | }) |
| 353 | 353 | ->searchColumns('amount', 'payment_method', 'payment_status') |
@@ -372,11 +372,11 @@ discard block |
||
| 372 | 372 | ->select('id', 'invoice_id', 'user_id', 'amount', 'payment_method', 'payment_status', 'created_at'); |
| 373 | 373 | //dd(\Input::all()); |
| 374 | 374 | return \Datatable::query($payments) |
| 375 | - ->addColumn('number', function ($model) { |
|
| 375 | + ->addColumn('number', function($model) { |
|
| 376 | 376 | return $model->invoice()->first()->number; |
| 377 | 377 | }) |
| 378 | 378 | ->showColumns('amount', 'payment_method', 'payment_status', 'created_at') |
| 379 | - ->addColumn('total', function ($model) { |
|
| 379 | + ->addColumn('total', function($model) { |
|
| 380 | 380 | return $model->grand_total; |
| 381 | 381 | }) |
| 382 | 382 | ->searchColumns('amount', 'payment_method', 'payment_status') |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | $setting = $set->find(1); |
| 141 | 141 | |
| 142 | 142 | if ($setting->error_log == 1 && $setting->error_email != '') { |
| 143 | - $s = \Mail::send('errors.report', ['e' => $e], function ($m) use ($setting) { |
|
| 143 | + $s = \Mail::send('errors.report', ['e' => $e], function($m) use ($setting) { |
|
| 144 | 144 | $m->from($setting->email, $setting->company); |
| 145 | 145 | |
| 146 | 146 | $m->to($setting->error_email, 'Agora Error')->subject('Agora Invoicing Error'); |
@@ -57,6 +57,9 @@ discard block |
||
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | + /** |
|
| 61 | + * @param Exception $e |
|
| 62 | + */ |
|
| 60 | 63 | protected function renderException($e) |
| 61 | 64 | { |
| 62 | 65 | switch ($e) { |
@@ -110,8 +113,8 @@ discard block |
||
| 110 | 113 | /** |
| 111 | 114 | * Common finction to render both types of codes. |
| 112 | 115 | * |
| 113 | - * @param type $request |
|
| 114 | - * @param type $e |
|
| 116 | + * @param \Illuminate\Http\Request $request |
|
| 117 | + * @param Exception $e |
|
| 115 | 118 | * |
| 116 | 119 | * @return type mixed |
| 117 | 120 | */ |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * |
| 67 | 67 | * @param Request $request |
| 68 | 68 | * |
| 69 | - * @return Response |
|
| 69 | + * @return \Illuminate\Http\RedirectResponse |
|
| 70 | 70 | */ |
| 71 | 71 | public function postReset(Request $request) |
| 72 | 72 | { |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | * |
| 108 | 108 | * @param \Illuminate\Http\Request $request |
| 109 | 109 | * |
| 110 | - * @return \Illuminate\Http\Response |
|
| 110 | + * @return \Illuminate\Http\RedirectResponse |
|
| 111 | 111 | */ |
| 112 | 112 | public function sendResetLinkEmail(Request $request) |
| 113 | 113 | { |
@@ -154,7 +154,6 @@ |
||
| 154 | 154 | /** |
| 155 | 155 | * List only one release by tag. |
| 156 | 156 | * |
| 157 | - * @param Request $request |
|
| 158 | 157 | * |
| 159 | 158 | * @return type |
| 160 | 159 | */ |
@@ -49,6 +49,9 @@ |
||
| 49 | 49 | $this->user = $user; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | + /** |
|
| 53 | + * @param string $code |
|
| 54 | + */ |
|
| 52 | 55 | public function renewBySubId($id, $planid, $payment_method, $cost, $code) |
| 53 | 56 | { |
| 54 | 57 | try { |
@@ -91,6 +91,9 @@ |
||
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | + /** |
|
| 95 | + * @param string $data |
|
| 96 | + */ |
|
| 94 | 97 | public function middlePage($data, $url, $access_code, $working_key) |
| 95 | 98 | { |
| 96 | 99 | try { |