/** * define page title and load template files */ public function index() { $action = $_GET['action']; $sms_model = new \models\sms(); $smsgroup_model = new \models\smsgroup(); $this->data['groups'] = $smsgroup_model->all(); $this->data['title'] = 'SMS'; if (isset($_POST) && !empty($_POST)) { $group_id = $_POST['group_id']; $message = $_POST['content']; $sender = 'TheWorkCourt'; $subscribers = $sms_model->get(array('group_id' => $group_id)); foreach ($subscribers as $item) { echo $item->phone . "<br>"; \helpers\document::sendSMS($sender, $item->phone, $message); } $this->data['success'] = 'SMS Sent!'; } View::rendertemplate('home_header', $this->data); View::rendertemplate('sidebar', $this->data); View::render('sms/sms', $this->data); View::rendertemplate('footer', $this->data); }
public function sms($param) { $action = $_GET['action']; $sms_model = new \models\newsletter(); $user_model = new \models\users(); $this->data['subscribers'] = $sms_model->byGroup(); $this->data['title'] = 'SMS'; if (isset($_POST) && !empty($_POST)) { $group = $_POST['subscribers']; $message = $_POST['content']; $sender = 'TheWorkCourt'; $subscribers = $sms_model->get(array('group' => $group)); foreach ($subscribers as $item) { $send = \helpers\document::sendSMS($sender, $item->phone, $message); } $this->data['success'] = 'Mails Sent!'; } View::rendertemplate('home_header', $this->data); View::rendertemplate('sidebar', $this->data); View::render('crm/sms', $this->data); View::rendertemplate('footer', $this->data); }
?> </td> <td class="center"><?php echo $item->title; ?> </td> <td class="center"><?php echo $item->duration; ?> </td> <td class="center"><?php echo $item->description; ?> </td> <td class="center"><?php echo \helpers\document::price($item->amount); ?> </td> <td class="center"><?php echo $item->discount . '%'; ?> </td> <td class="center"><?php echo $item->proficiency; ?> </td> <td class="center"> <div class="btn-group"> <button class="btn btn-small">Option</button> <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span></button>
public function scandir() { if (isset($_POST) && !empty($_POST)) { $file = $_POST['pushFile']; foreach ($file as $item) { if ($item != '//errorlog.html') { $file_path[] = BASE_PATH . DS . 'app' . $item; } } $destination = BASE_PATH . DS . 'app' . DS . 'templates' . DS . 'push' . DS . 'update.zip'; $folderpath = BASE_PATH . DS . 'app' . DS; $zip = \helpers\document::zip($folderpath, $destination, $file_path, true); } $scanner = new \helpers\scanner(); $config = $scanner->get_config(); $original_cwd = getcwd(); if (isset($config['start_dir'])) { chdir($config['start_dir']); } $results = $scanner->scan(); if ($results) { $this->data['report'] = 'Scan Results - For ' . $results['current_scan'] . "<br>"; unset($results['current_scan']); $count = count($results['Changed']) + count($results['Added']) + count($results['Deleted']); foreach ($results as $key => $entries) { $this->data['report'] .= $key . "<br>"; foreach ($entries as $entry) { $pushFile = ltrim($entry, '.'); $this->data['report'] .= '<input type="checkbox" class="checkbox1" name="pushFile[]" value="' . $pushFile . '" > ' . $pushFile . "<br>"; } $this->data['report'] .= "<br>"; } } chdir($original_cwd); View::rendertemplate('header', $this->data); View::rendertemplate('sidebar', $this->data); View::render('update/push.index', $this->data); View::rendertemplate('footer', $this->data); }
<td> <?php if ($item->content_page_id != $item->content_subto) { echo "<strong>__</strong>" . $item->page_name; } else { echo $item->page_name; } ?> </td> <td><?php echo $item->page_alias; ?> </td> <td><?php echo \helpers\document::get_word(strip_tags($item->content_content), 10); ?> </td> <td><?php echo date("M d, Y", $item->content_created); ?> </td> <td> <div class="btn-group"> <button class="btn btn-small">Option</button> <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span></button> <ul class="dropdown-menu"> <li><a href="<?php echo DIR . 'page/edit/' . $item->content_page_id; ?>