@@ -105,10 +105,10 @@ |
||
| 105 | 105 | try { |
| 106 | 106 | $crypto = new Crypto(); |
| 107 | 107 | $ccavanue = $this->ccavanue->findOrFail(1); |
| 108 | - $workingKey = $ccavanue->working_key; //Working Key should be provided here. |
|
| 109 | - $encResponse = $request->get('encResp'); //This is the response sent by the CCAvenue Server |
|
| 108 | + $workingKey = $ccavanue->working_key; //Working Key should be provided here. |
|
| 109 | + $encResponse = $request->get('encResp'); //This is the response sent by the CCAvenue Server |
|
| 110 | 110 | |
| 111 | - $rcvdString = $crypto->decrypt($encResponse, $workingKey); //Crypto Decryption used as per the specified working key. |
|
| 111 | + $rcvdString = $crypto->decrypt($encResponse, $workingKey); //Crypto Decryption used as per the specified working key. |
|
| 112 | 112 | $order_status = ''; |
| 113 | 113 | $decryptValues = explode('&', $rcvdString); |
| 114 | 114 | $dataSize = count($decryptValues); |
@@ -46,23 +46,23 @@ discard block |
||
| 46 | 46 | //dd($user); |
| 47 | 47 | |
| 48 | 48 | return \Datatable::query($user) |
| 49 | - ->addColumn('#', function ($model) { |
|
| 49 | + ->addColumn('#', function($model) { |
|
| 50 | 50 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 51 | 51 | }) |
| 52 | - ->addColumn('first_name', function ($model) { |
|
| 52 | + ->addColumn('first_name', function($model) { |
|
| 53 | 53 | return '<a href='.url('clients/'.$model->id).'>'.ucfirst($model->first_name).' '.ucfirst($model->last_name).'</a>'; |
| 54 | 54 | }) |
| 55 | 55 | |
| 56 | 56 | ->showColumns('email', 'created_at') |
| 57 | 57 | |
| 58 | - ->addColumn('active', function ($model) { |
|
| 58 | + ->addColumn('active', function($model) { |
|
| 59 | 59 | if ($model->active == 1) { |
| 60 | 60 | return "<span style='color:green'>Activated</span>"; |
| 61 | 61 | } else { |
| 62 | 62 | return "<span style='color:red'>Not activated</span>"; |
| 63 | 63 | } |
| 64 | 64 | }) |
| 65 | - ->addColumn('action', function ($model) { |
|
| 65 | + ->addColumn('action', function($model) { |
|
| 66 | 66 | return '<a href='.url('clients/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
| 67 | 67 | }) |
| 68 | 68 | ->searchColumns('email', 'first_name') |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $token = str_random(40); |
| 99 | 99 | $this->activate->create(['email' => $user->email, 'token' => $token]); |
| 100 | 100 | |
| 101 | - \Mail::send('emails.welcome', ['token' => $token, 'email' => $user->email, 'pass' => $str], function ($message) use ($user) { |
|
| 101 | + \Mail::send('emails.welcome', ['token' => $token, 'email' => $user->email, 'pass' => $str], function($message) use ($user) { |
|
| 102 | 102 | $message->to($user->email, $user->first_name)->subject('Welcome!'); |
| 103 | 103 | }); |
| 104 | 104 | |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | $country = $request->input('country'); |
| 56 | 56 | |
| 57 | 57 | //$user = new User; |
| 58 | - // $user = $this->user->select('id', 'first_name', 'last_name', 'email', 'created_at', 'active')->orderBy('created_at', 'desc'); |
|
| 58 | + // $user = $this->user->select('id', 'first_name', 'last_name', 'email', 'created_at', 'active')->orderBy('created_at', 'desc'); |
|
| 59 | 59 | //dd($user); |
| 60 | 60 | $user = $this->advanceSearch($name, $username, $company, $mobile, $email, $country); |
| 61 | 61 | |
@@ -87,14 +87,14 @@ discard block |
||
| 87 | 87 | public function GetTemplates() |
| 88 | 88 | { |
| 89 | 89 | return \Datatable::collection($this->template->select('id', 'name', 'type')->get()) |
| 90 | - ->addColumn('#', function ($model) { |
|
| 90 | + ->addColumn('#', function($model) { |
|
| 91 | 91 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 92 | 92 | }) |
| 93 | 93 | ->showColumns('name') |
| 94 | - ->addColumn('type', function ($model) { |
|
| 94 | + ->addColumn('type', function($model) { |
|
| 95 | 95 | return $this->type->where('id', $model->type)->first()->name; |
| 96 | 96 | }) |
| 97 | - ->addColumn('action', function ($model) { |
|
| 97 | + ->addColumn('action', function($model) { |
|
| 98 | 98 | return '<a href='.url('templates/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
| 99 | 99 | }) |
| 100 | 100 | ->searchColumns('name') |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | $data = str_replace($array1, $array2, $data); |
| 253 | 253 | $settings = \App\Model\Common\Setting::find(1); |
| 254 | 254 | $fromname = $settings->company; |
| 255 | - \Mail::send('emails.mail', ['data' => $data], function ($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) { |
|
| 255 | + \Mail::send('emails.mail', ['data' => $data], function($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) { |
|
| 256 | 256 | |
| 257 | 257 | $m->from($from, $fromname); |
| 258 | 258 | |
@@ -91,10 +91,10 @@ discard block |
||
| 91 | 91 | //dd($this->invoice->get()); |
| 92 | 92 | //$invoice = \DB::table('invoices'); |
| 93 | 93 | return \Datatable::query($this->invoice->select('id', 'user_id', 'number', 'date', 'grand_total', 'status', 'created_at')) |
| 94 | - ->addColumn('#', function ($model) { |
|
| 94 | + ->addColumn('#', function($model) { |
|
| 95 | 95 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 96 | 96 | }) |
| 97 | - ->addColumn('user_id', function ($model) { |
|
| 97 | + ->addColumn('user_id', function($model) { |
|
| 98 | 98 | |
| 99 | 99 | $first = $this->user->where('id', $model->user_id)->first()->first_name; |
| 100 | 100 | $last = $this->user->where('id', $model->user_id)->first()->last_name; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>'; |
| 104 | 104 | }) |
| 105 | 105 | ->showColumns('number', 'created_at', 'grand_total', 'status') |
| 106 | - ->addColumn('action', function ($model) { |
|
| 106 | + ->addColumn('action', function($model) { |
|
| 107 | 107 | $order = \App\Model\Order\Order::where('invoice_id', $model->id)->first(); |
| 108 | 108 | if (!$order) { |
| 109 | 109 | $action = '<a href='.url('order/execute?invoiceid='.$model->id)." class='btn btn-sm btn-primary'>Execute Order</a>"; |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use App\Http\Controllers\Controller; |
| 6 | 6 | use App\Model\Common\Template; |
| 7 | 7 | use App\Model\Order\Invoice; |
| 8 | -use App\Model\Order\InvoiceItem; |
|
| 9 | 8 | use App\Model\Order\Order; |
| 10 | 9 | use App\Model\Product\Subscription; |
| 11 | 10 | use App\User; |
@@ -21,6 +21,9 @@ discard block |
||
| 21 | 21 | private $end; |
| 22 | 22 | private $type; |
| 23 | 23 | |
| 24 | + /** |
|
| 25 | + * @param string $start |
|
| 26 | + */ |
|
| 24 | 27 | public function __construct($start, $end = '') |
| 25 | 28 | { |
| 26 | 29 | $this->start = $start; |
@@ -39,6 +42,9 @@ discard block |
||
| 39 | 42 | $this->end = ''; |
| 40 | 43 | } |
| 41 | 44 | |
| 45 | + /** |
|
| 46 | + * @param string $add |
|
| 47 | + */ |
|
| 42 | 48 | public function set_type($add) |
| 43 | 49 | { |
| 44 | 50 | $this->type = $add; |
@@ -455,6 +461,9 @@ discard block |
||
| 455 | 461 | |
| 456 | 462 | protected $attributes; |
| 457 | 463 | |
| 464 | + /** |
|
| 465 | + * @param string $name |
|
| 466 | + */ |
|
| 458 | 467 | public function add_top_attribute($name, $string) |
| 459 | 468 | { |
| 460 | 469 | $this->attributes[$name] = $string; |
@@ -1019,6 +1028,9 @@ discard block |
||
| 1019 | 1028 | $this->request->set_filters([]); |
| 1020 | 1029 | } |
| 1021 | 1030 | |
| 1031 | + /** |
|
| 1032 | + * @param FilterInterface $wrap |
|
| 1033 | + */ |
|
| 1022 | 1034 | protected function apply_filters($wrap) |
| 1023 | 1035 | { |
| 1024 | 1036 | for ($i = 0; $i < count($this->filters); $i++) { |
@@ -1032,6 +1044,9 @@ discard block |
||
| 1032 | 1044 | $this->sorts[] = ['name' => $name, 'direction' => $direction]; |
| 1033 | 1045 | } |
| 1034 | 1046 | |
| 1047 | + /** |
|
| 1048 | + * @param SortInterface $wrap |
|
| 1049 | + */ |
|
| 1035 | 1050 | protected function apply_sorts($wrap) |
| 1036 | 1051 | { |
| 1037 | 1052 | for ($i = 0; $i < count($this->sorts); $i++) { |
@@ -355,11 +355,11 @@ |
||
| 355 | 355 | private $updating = false; //!< flag of update mode ( response for data-update ) |
| 356 | 356 | private $db; //!< db connection resource |
| 357 | 357 | protected $dload; //!< flag of dyn. loading mode |
| 358 | - public $access; //!< AccessMaster instance |
|
| 358 | + public $access; //!< AccessMaster instance |
|
| 359 | 359 | protected $data_separator = "\n"; |
| 360 | 360 | |
| 361 | - public $sql; //DataWrapper instance |
|
| 362 | - public $event; //EventMaster instance |
|
| 361 | + public $sql; //DataWrapper instance |
|
| 362 | + public $event; //EventMaster instance |
|
| 363 | 363 | public $limit = false; |
| 364 | 364 | |
| 365 | 365 | private $id_seed = 0; //!< default value, used to generate auto-IDs |
@@ -499,6 +499,10 @@ |
||
| 499 | 499 | @return |
| 500 | 500 | list of data fields ( ready to be used in SQL query ) |
| 501 | 501 | */ |
| 502 | + |
|
| 503 | + /** |
|
| 504 | + * @param DBDataWrapper $db |
|
| 505 | + */ |
|
| 502 | 506 | public function db_names_list($db) |
| 503 | 507 | { |
| 504 | 508 | $out = []; |
@@ -9,19 +9,19 @@ |
||
| 9 | 9 | **/ |
| 10 | 10 | class DataRequestConfig |
| 11 | 11 | { |
| 12 | - private $filters; //!< array of filtering rules |
|
| 13 | - private $relation = false; //!< ID or other element used for linking hierarchy |
|
| 14 | - private $sort_by; //!< sorting field |
|
| 15 | - private $start; //!< start of requested data |
|
| 16 | - private $count; //!< length of requested data |
|
| 12 | + private $filters; //!< array of filtering rules |
|
| 13 | + private $relation = false; //!< ID or other element used for linking hierarchy |
|
| 14 | + private $sort_by; //!< sorting field |
|
| 15 | + private $start; //!< start of requested data |
|
| 16 | + private $count; //!< length of requested data |
|
| 17 | 17 | |
| 18 | 18 | private $order = false; |
| 19 | 19 | private $user; |
| 20 | 20 | private $version; |
| 21 | 21 | |
| 22 | 22 | //for render_sql |
| 23 | - private $source; //!< souce table or another source destination |
|
| 24 | - private $fieldset; //!< set of data, which need to be retrieved from source |
|
| 23 | + private $source; //!< souce table or another source destination |
|
| 24 | + private $fieldset; //!< set of data, which need to be retrieved from source |
|
| 25 | 25 | |
| 26 | 26 | /*! constructor |
| 27 | 27 | |
@@ -67,6 +67,10 @@ |
||
| 67 | 67 | self::$eventsStatic[$name][] = $method; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | + /** |
|
| 71 | + * @param string $name |
|
| 72 | + * @param Connector $method |
|
| 73 | + */ |
|
| 70 | 74 | public static function trigger_static($name, $method) |
| 71 | 75 | { |
| 72 | 76 | $arg_list = func_get_args(); |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | **/ |
| 138 | 138 | class AccessMaster |
| 139 | 139 | { |
| 140 | - private $rules,$local; |
|
| 140 | + private $rules, $local; |
|
| 141 | 141 | |
| 142 | 142 | /*! constructor |
| 143 | 143 | |
@@ -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) { |
@@ -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() |