public function Manage($permalink) { $this->data['user'] = $this->checkLogin(OpenSms::OPEN_ROLE_ADMIN); $page = $this->loadModel('OpenSms_Model_Page', [0 => $permalink]); if ($page->Id < 1) { $this->setError("No page found with the permalink: {$permalink}", "page_manage"); $this->redirectToAction('index'); } if (isset($_POST['title'])) { $page->Title = $_POST['title']; $page->Layout = $_POST['layout']; $page->Description = $_POST['description']; $result = $page->Save(); if ($result == true) { $this->setNotification('Page saved', 'page_manage'); } else { $this->setError('Error in saving page', 'page_manage'); } $this->redirectToAction('index'); } $this->data['page'] = $page; $this->data['pageTitle'] = "Manage Page"; OpenSms::registerView('cms_ck_editor_js', 'default/assets/plugins/ckeditor/ckeditor.js', OpenSms::VIEW_TYPE_SCRIPT, OpenSms::VIEW_POSITION_TOP); $this->renderTemplate(); }
public function Save() { //if installed goto dashboard if ($this->getSystemSetting(OpenSms::INSTALLATION_STATUS)) { OpenSms::redirectToAction('index', 'dashboard'); } //var_dump($_POST);die(); // CREATE $config = new SimpleXmlElement('<settings/>'); $config->{OpenSms::VERSION} = $this->getSystemSetting(OpenSms::VERSION); $config->{OpenSms::SITE_NAME} = $this->getFormData(OpenSms::SITE_NAME); $config->{OpenSms::SITE_URL} = $this->getFormData(OpenSms::SITE_URL); $config->{OpenSms::DB_TYPE} = 'mysql'; $config->{OpenSms::DB_HOST} = $this->getFormData(OpenSms::DB_HOST); $config->{OpenSms::DB_NAME} = $this->getFormData(OpenSms::DB_NAME); $config->{OpenSms::DB_TABLE_PREFIX} = $this->getFormData(OpenSms::DB_TABLE_PREFIX); $config->{OpenSms::DB_USERNAME} = $this->getFormData(OpenSms::DB_USERNAME); $config->{OpenSms::DB_PASSWORD} = $this->getFormData(OpenSms::DB_PASSWORD); $config->{OpenSms::DB_PASSWORD} = $this->getFormData(OpenSms::DB_PASSWORD); $config->{OpenSms::CURRENT_THEME_KEY} = $this->getFormData(OpenSms::CURRENT_THEME_KEY); $config->{OpenSms::OPEN_PRICE_PER_UNIT} = $this->getFormData(OpenSms::OPEN_PRICE_PER_UNIT); $config->{OpenSms::OPEN_UNITS_PER_SMS} = $this->getFormData(OpenSms::OPEN_UNITS_PER_SMS); $config->{OpenSms::INSTALLATION_STATUS} = false; //unlink(OpenSms::SETTINGS_FILE_PATH); $config->saveXML(OpenSms::SETTINGS_FILE_PATH); $this->setNotification('Settings saved', 'settings_save'); OpenSms::redirectToAction('index'); }
public function Index() { $this->data['user'] = $this->checkLogin(); $this->data['transaction'] = $this->data['user']->GetLastTransaction(); if ($this->data['transaction']->Status == OpenSms::OPEN_TRANSACTION_STATUS_COMPLETED) { $this->setError("No pending transaction found", "voucher_index"); OpenSms::redirectToAction('Index', 'Recharge', 'Account'); } if (isset($_POST['pin'])) { if (empty($_POST['pin']) || empty($_POST['serialNumber'])) { $this->setError('Both PIN and serial number are required', 'voucher_index'); } else { $card = OpenSms::loadModel('OpenSms_Model_Card', [0 => $_POST['serialNumber'], 1 => $_POST['pin']]); if ($card->IsValid) { $result = $card->Load($this->data['user']->LoginId); if ($result['success'] != true) { $this->setError($result['message'], 'voucher_index'); } else { $this->data['transaction']->Status = OpenSms::OPEN_TRANSACTION_STATUS_COMPLETED; $this->data['transaction']->Save(); $this->setNotification("Your account has been credited with {$card->Unit} units. Thanks for your patronage", 'voucher_index'); OpenSms::redirectToAction('index', 'dashboard', 'dashboard'); } } else { $this->setError('Invalid card information. Please try again', 'voucher_index'); } } } $this->data['pageTitle'] = "Load Voucher"; $this->renderTemplate(); }
public function Index() { $this->data['user'] = $this->checkLogin(); $this->data['transactions'] = $this->data['user']->GetTransactions(); $this->data['pageTitle'] = 'My Transactions | ' . OpenSms::getSystemSetting(OpenSms::SITE_NAME); $this->renderTemplate(); }
public function index($_page = 0) { $user = $this->checkLogin(); //########==paging==########// $rec_limit = 50; $count = OpenSms::callModelStaticMethod('OpenSms_Model_BulkSms', 'GetBulkSMSCount', [0 => $user->LoginId]); $no = $count / $rec_limit; if ($count % $rec_limit == 0) { $no -= 1; } $link = '<ul class="pagination">'; for ($i = 0; $i <= $no; $i++) { if ($i == $_page - 1 || $i == 0 && $_page == 0) { $link .= '<li class="active"><a href="#">Page ' . ($i + 1) . '</a></li>'; } else { $link .= '<li><a href="' . OpenSms::getActionUrl('index', 'sent', 'sms', [0 => $i + 1]) . '">Page ' . ($i + 1) . '</a></li>'; } } $link .= '</ul>'; $this->data['link'] = $link; if ($_page != 0) { $page = stripslashes($_page) - 1; $offset = $page * $rec_limit; } else { $page = 0; $offset = 0; } $this->data['bulkSmsList'] = OpenSms::callModelStaticMethod('OpenSms_Model_BulkSms', 'GetBulkSMS', [0 => $user->LoginId, 1 => $offset, 2 => $rec_limit]); $this->data['pageTitle'] = 'Sent Messages | ' . OpenSms::getSystemSetting(OpenSms::SITE_NAME); $this->data['user'] = $user; $this->renderTemplate(); }
public function Index() { $this->getCurrentUri(); $user = $this->checkLogin(); $this->data['user'] = $user; $this->data['transactions'] = $user->GetTransactions(); $this->data['pageTitle'] = 'Dashboard | ' . OpenSms::getSystemSetting(OpenSms::SITE_NAME); $this->renderTemplate('body'); }
public function Index() { $this->data['pageTitle'] = 'Mange Voucher'; $this->data['user'] = $this->checkLogin(OpenSms::OPEN_ROLE_ADMIN); if (isset($_REQUEST['no'])) { $this->data['cards'] = OpenSms::callModelStaticMethod('OpenSms_Model_Card', 'GenerateCard', [$_REQUEST['no'], $_REQUEST['unit']]); } $this->renderTemplate(); }
public function Delete() { $sql = "delete from " . OpenSms::getTableName('contact') . " where id = '" . StringMethods::MakeSave($this->Id) . "'"; //die($sql); if (OpenSms_Helper_Db::executeNonQuery($sql)) { return 'One number deleted'; } else { return 'Error in deleting number'; } }
public function Save() { $sql = "insert into " . OpenSms::getTableName('sms') . "(bulkSMSId, number, message, sender, refId, Status)\r\n\t\t\t\t value('" . StringMethods::MakeSave($this->BulkSMSId) . "', '" . StringMethods::MakeSave($this->Number) . "', '" . StringMethods::MakeSave($this->Message) . "', '" . StringMethods::MakeSave($this->Sender) . "', '" . StringMethods::MakeSave($this->RefId) . "', '" . StringMethods::MakeSave($this->Status) . "');"; OpenSms_Helper_Db::executeNonQuery($sql); if ($this->Id == -1) { $sql = "select MAX(id) as no from `" . OpenSms::getTableName('sms') . "`"; $result = OpenSms_Helper_Db::executeReader($sql); foreach ($result as $r) { $this->Id = $r->no; return $r->no; } } }
public function images() { $this->data['user'] = $this->checkLogin(OpenSms::OPEN_ROLE_ADMIN); $this->data['pageTitle'] = "CMS-Images"; $this->data['images'] = OpenSms::getImages(); //merge all foreach ($this->data['images'][OpenSms::CURRENT_THEME_KEY] as $key => $image) { $this->data['images'][$key] = $image; } unset($this->data['images'][OpenSms::CURRENT_THEME_KEY]); $this->data['sn'] = 0; $this->renderTemplate(); }
public function DisplayPage($key) { $this->page = $this->loadModel('OpenSms_Model_Page', [0 => $key]); if (!isset($this->page->Id)) { return false; } $this->module = OpenSms_Model_System_Module::getModule('cms'); OpenSms::setCurrentModule($this->module); OpenSms::setCurrentRoute(new OpenSms_Model_System_Route($key, 'Actions', 'main/cms/actions.php', 'DisplayPage')); $this->data['contentKey'] = 'opensms_page_' . $this->page->Permalink; $this->data['pageTitle'] = $this->page->Title; $this->renderTemplate(); exit; }
public static function getClassDb() { if (self::$db != NULL) { return self::$db; } // set the (optional) options of the PDO connection. in this case, we set the fetch mode to // "objects", which means all results will be objects, like this: $result->user_name ! // For example, fetch mode FETCH_ASSOC would return results like this: $result["user_name] ! // @see http://www.php.net/manual/en/pdostatement.fetch.php $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING); // generate a database connection, using the PDO connector // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/ self::$db = new PDO(OpenSms::getSystemSetting(OpenSms::DB_TYPE) . ':host=' . OpenSms::getSystemSetting(OpenSms::DB_HOST) . ';dbname=' . OpenSms::getSystemSetting(OpenSms::DB_NAME), OpenSms::getSystemSetting(OpenSms::DB_USERNAME), OpenSms::getSystemSetting(OpenSms::DB_PASSWORD), $options); return self::$db; }
public function save() { if (!isset($_POST[OpenSms::DB_HOST])) { OpenSms::redirectToAction('index'); } //if installed goto dashboard if ($this->getSystemSetting(OpenSms::INSTALLATION_STATUS)) { OpenSms::redirectToAction('index', 'dashboard'); } //var_dump($_POST);die(); // CREATE $config = new SimpleXmlElement('<settings/>'); $config->{OpenSms::VERSION} = $this->getSystemSetting(OpenSms::VERSION); $config->{OpenSms::SITE_NAME} = $this->getFormData(OpenSms::SITE_NAME); $config->{OpenSms::SITE_URL} = $this->getFormData(OpenSms::SITE_URL); $config->{OpenSms::DB_TYPE} = 'mysql'; $config->{OpenSms::DB_HOST} = $this->getFormData(OpenSms::DB_HOST); $config->{OpenSms::DB_NAME} = $this->getFormData(OpenSms::DB_NAME); $config->{OpenSms::DB_TABLE_PREFIX} = $this->getFormData(OpenSms::DB_TABLE_PREFIX); $config->{OpenSms::DB_USERNAME} = $this->getFormData(OpenSms::DB_USERNAME); $config->{OpenSms::DB_PASSWORD} = $this->getFormData(OpenSms::DB_PASSWORD); $config->{OpenSms::DB_PASSWORD} = $this->getFormData(OpenSms::DB_PASSWORD); $config->{OpenSms::CURRENT_THEME_KEY} = 'default'; $config->{OpenSms::OPEN_PRICE_PER_UNIT} = $this->getFormData(OpenSms::OPEN_PRICE_PER_UNIT); $config->{OpenSms::OPEN_UNITS_PER_SMS} = $this->getFormData(OpenSms::OPEN_UNITS_PER_SMS); $config->{OpenSms::INSTALLATION_STATUS} = 'installed'; //unlink(OpenSms::SETTINGS_FILE_PATH); $config->saveXML(OpenSms::SETTINGS_FILE_PATH); $this->loadSystemSettings(); //create tables OpenSms_Helper_Db::executeNonQuery($this->getDbScript()); //create admin account $user = $this->loadModel('OpenSms_Model_User'); $user->LoginId = $this->getFormData('admin_username'); $user->Password = $this->getFormData('admin_password'); $user->Role = OpenSms_Model_User::ADMIN; $saved = $user->save(); OpenSms::redirectToAction('complete', 'install', 'admin', [0 => $saved == true ? 1 : 0]); }
public function Save() { $user = $this->checkLogin(); //create a transaction $trans = $this->loadModel("OpenSms_Model_Transaction"); foreach ($_POST as $key => $value) { $trans->{$key} = $value; } $trans->Unit = $trans->Amount / OpenSms::getSystemSetting(OpenSms::OPEN_PRICE_PER_UNIT); $trans->LoginId = $user->LoginId; //get the selected payment $payment = OpenSms::getPaymentMethod($_POST['PaymentMethod'], true); //var_dump($payment); die(); //set the order status to that of the payment method $trans->Status = $payment->order_status; $trans->Type = OpenSms::OPEN_TRANSACTION_TYPE_CREDIT; //save the order $trans->Save(); //put the transaction in session $_SESSION[OpenSms::LAST_TRANSACTION] = $trans; //make payment $paymentController = new $payment->controller(); $paymentController->{$payment->action}(); }
<?php $this->renderTemplate('content'); ?> </div><!-- /.register-box --> <!-- jQuery 2.1.3 --> <script src="<?php echo OpenSms::getBaseUrl(); ?> app/design/default/assets/plugins/jQuery/jQuery-2.1.3.min.js"></script> <!-- Bootstrap 3.3.2 JS --> <script src="<?php echo OpenSms::getBaseUrl(); ?> app/design/default/assets/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> <!-- iCheck --> <script src="<?php echo OpenSms::getBaseUrl(); ?> app/design/default/assets/plugins/iCheck/icheck.min.js" type="text/javascript"></script> <script> $(function () { $('input').iCheck({ checkboxClass: 'icheckbox_square-blue', radioClass: 'iradio_square-blue', increaseArea: '20%' // optional }); }); </script> </body> </html>
$this->renderSpecialView(OpenSms::VIEW_POSITION_BODY); ?> <!-- MAIN CONTAINER --> <div class="container-fluid"> <!-- NAVBAR SECTION --> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="<?php echo OpenSms::getActionUrl('index', 'Home', 'Home'); ?> " > Global Smile <i class="fa fa-plus"></i></a> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav navbar-right"> <li ><a data-toggle="modal" data-target="#mAbout" href="#mHome"> ABOUT</a></li> <li><a data-toggle="modal" data-target="#mService" href="#mService">SERVICES</a></li> <li><a data-toggle="modal" data-target="#mContact" href="#myModal">CONTACT</a></li> <li><a data-toggle="modal" data-target="#mContact" href="#myModal">HEALTH TALK</a></li> </ul> </div> </div> </div> <!-- END NAVBAR SECTION -->
</div><!-- /.col --> <div class="col-md-5"> <div class="box box-info"> <div class="box-header with-border"> <h3 class="box-title">New Module</h3> <div class="box-tools pull-right"> <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button> </div> </div><!-- /.box-header --> <form enctype="multipart/form-data" role="form" action="<?php echo OpenSms::getActionUrl('add'); ?> " method="post"> <div class="box-body"> <div class="form-group"> <label for="name">Module File</label> <input type="file" class="form-control" id="file" name="zip_file" placeholder="Module File Path"> </div> </div><!-- /.box-body --> <div class="box-footer"> <button type="submit" class="btn btn-primary">Install</button> </div>
public static function FindUserByEmail($emailId) { $sql = "select * from " . OpenSms::getTableName('users') . " where loginId = '" . StringMethods::MakeSave($emailId) . "';"; $u = new OpenSms_Model_User(); $result = OpenSms_Helper_Db::executeReader($sql); return isset($result[0]) ? self::copyFromPDO($result[0]) : new OpenSms_Model_User(); }
<?php /** * Created by PhpStorm. * User: Tony * Date: 7/3/2015 * Time: 9:38 AM */ ?> <section id="error" class="container text-center"> <h1>Make a Donation</h1> <p>You can be part of this life saving movement. Contact us today for information on how to make your donation</p> <a class="btn btn-primary" href="<?php echo OpenSms::getActionUrl('index', '*', 'contact'); ?> #contact-page">GO TO THE CONTACT PAGE</a> </section><!--/#error-->
public function Send() { $user = $this->checkLogin(); //var_dump($_POST); die(); if (isset($_POST['sendmessage'])) { $hasErro = FALSE; if ($_POST['sender'] == '' || $_POST['message'] == '') { $notification = 'Sender and message cannot be empty'; $hasErro = TRUE; } else { //sending message $recepients = ''; //getting recipiet from the txtbox if (isset($_POST['recipient'])) { $contactInput = preg_split('/(\\r?\\n)+/', trim($_POST['recipient'])); foreach ($contactInput as $ci) { $recepients .= $ci . ','; } } //getting recipient from the uploaded file if (!empty($_FILES['to_file']['name'])) { //chicking file type $allowedTxt = array('txt', 'TXT'); $allowedXls = array('xls', 'XLS'); $filename = $_FILES['to_file']['name']; $ext = pathinfo($filename, PATHINFO_EXTENSION); if (in_array($ext, $allowedTxt)) { $fp = fopen($_FILES['to_file']['tmp_name'], 'rb'); while (($line = fgets($fp)) !== false) { if (strlen(trim($line)) > 4) { $f = substr($line, 0, 1); if ($f != '0' && $f != '2') { $line = '0' . $line; } $recepients .= $line . ','; } } } elseif (in_array($ext, $allowedXls)) { //excel sheet require_once 'app/code/opensms/helper/excel_reader2.php'; $data = new Spreadsheet_Excel_Reader($_FILES['to_file']['tmp_name']); for ($i = 0; $i < count($data->sheets); $i++) { if (count($data->sheets[$i]['cells']) > 0) { for ($j = 1; $j <= count($data->sheets[$i]['cells']); $j++) { $num = $data->sheets[$i]['cells'][$j][1]; if (strlen(trim($num)) > 4) { $f = substr($num, 0, 1); if ($f != '0' && $f != '2') { $num = '0' . $num; } $recepients .= $num . ','; } } } } } else { $notification = 'Error! Please upload a text or an excel(xls) file'; $hasErro = TRUE; } } //getting recipient from group if (isset($_POST['groupid']) && trim($_POST['groupid']) != '-1') { $g = $this->loadModel('OpenSms_Model_Group', [0 => $_POST['groupid']]); $recepients .= $g->SerializeContacts(); } //senitizing number $recepients = str_replace(' ', '', trim($recepients)); //take out spcae $recepients = str_replace(PHP_EOL, '', trim($recepients)); //take out new lines $recepients = str_replace('+', '', $recepients); if (substr($recepients, 0, 1) == '0') { $recepients = '234' . substr($recepients, 1); } $recepients = str_replace(',0', ',234', $recepients); //take away the 1st and last comma if (substr($recepients, 0, 1) == ',') { $recepients = '' . substr($recepients, 1); } if (substr($recepients, strlen($recepients) - 1, 1) == ',') { $recepients = '' . substr($recepients, 0, strlen($recepients) - 1); } //balanc check $len = strlen($_POST['message']); $lenPerSMS = $len < 160 ? 160 : 153; $msgNo = $len < $lenPerSMS ? 1 : ($len - $len % $lenPerSMS) / $lenPerSMS; $msgNo = $len > $lenPerSMS && $len % $lenPerSMS != 0 ? $msgNo + 1 : $msgNo; //dskljfsaddlkl mk $notification = ''; $hasErro = FALSE; $count = ceil(count(explode(',', $recepients)) * $msgNo); $avu = $user->Balance * 1; $uneeded = $count * OpenSms::getSystemSetting(OpenSms::OPEN_UNITS_PER_SMS); if ($avu < $uneeded) { $notification = 'Insufficient SMS unit!'; $hasErro = TRUE; } else { if ($count > 0 && !$hasErro) { /* $url = API_URL.'api/SAPI/sendMessage?returnDetails=1&loginId='.API_USERNAME.'&password='******'&senderId='. urlencode($_POST["sender"]).'&message='.urlencode($_POST['message']). '&Recipients='.trim($recepients).'&sendOnDate=2/2/2'; */ $url = OpenSms::getField('Sms_Send_Api')->value; //replace username, password, senderId, message, recipients, sendOnDate $url = str_replace('@username@', OpenSms::getField('Sms_Api_Username')->value, $url); $url = str_replace('@password@', OpenSms::getField('Sms_Api_Password')->value, $url); $url = str_replace('@senderId@', urlencode($_POST["sender"]), $url); $url = str_replace('@message@', urlencode($_POST["message"]), $url); $url = str_replace('@recipients@', trim($recepients), $url); //die($url); //messge scheduling &sendondate=13-04-2014T12:03:20 if (isset($_POST['send_later']) && $_POST['send_later'] == 1) { $y = $_POST['schedule_year']; $mnt = $_POST['schedule_month']; $d = $_POST['schedule_day']; $h = $_POST['schedule_hour']; $m = $_POST['schedule_munite']; $now = new DateTime(); $selectedDateStr = $d . '-' . $mnt . '-' . $y . 'T' . $h . ':' . $m . ':00'; $sendDate = '&sendondate=' . urlencode($selectedDateStr); $url .= $sendDate; $url = str_replace('@sendOnDate@', $sendDate, $url); } else { $url = str_replace('@sendOnDate@', '2/2/2', $url); } //die($url); $xml = file_get_contents($url); //var_dump($xml);die(); //<result>True</result> //1701 //check if message sent and deduct //strpos(strtolower($xml), strtolower(OpenSms::getField('Sms_Api_Success_Keyword')) if (strpos(strtolower($xml), strtolower(OpenSms::getField('Sms_Api_Success_Keyword')->value))) { $user->Balance -= $count * OpenSms::getSystemSetting(OpenSms::OPEN_UNITS_PER_SMS); $user->Save(); $notification = "Message sent"; $bulksSMS = $this->loadModel('OpenSms_Model_BulkSms'); $bulksSMS->LoginId = $user->LoginId; $bulksSMS->Message = $_POST['message']; $bulksSMS->Sender = $_POST['sender']; $bulksSMS->Status = 1701; $bulksSMS->Count = $count; $bulksSMS->Save(); $messages = array(); $nos = explode(',', $recepients); foreach ($nos as $no) { if (empty($no)) { continue; } $message = $this->loadModel('OpenSms_Model_Message'); $message->BulkSMSId = $bulksSMS->Id; $message->Number = $no; $message->Message = $_POST['message']; $message->Sender = $_POST['sender']; $message->RefId = -1; $message->Status = 1701; $messages[] = $message; } $bulksSMS->SaveMessages($messages); } else { $notification = "Error! Message not sent"; } } else { if (!$hasErro) { $notification = 'Please enter at least one number'; } } } } } else { $notification = 'Invalid request param'; $hasErro = TRUE; } if ($hasErro) { $this->setError($notification, 'compose_send'); } else { $this->setNotification($notification, 'compose_send'); } OpenSms::redirectToAction('Index'); }
</section> <!-- Main content --> <section class="content"> <div class="row"> <!-- left column --> <div class="col-md-6"> <!-- general form elements --> <div class="box box-primary"> <div class="box-header"> <h3 class="box-title">General Info</h3> </div><!-- /.box-header --> <!-- form start --> <form role="form" action="<?php echo OpenSms::getActionUrl('save'); ?> " method="post"> <div class="box-body"> <div class="form-group"> <label for="exampleInputEmail1">Site Name</label> <input type="text" class="form-control" id="site_name" name="site_name" value="<?php echo $this->getFormData('site_name', OpenSms::FORM_POST_METHOD); ?> " placeholder="Display name of this site"> </div> <div class="form-group"> <label for="exampleInputPassword1">URL</label> <input type="text" class="form-control" id="site_url" name="site_url" value="<?php echo $this->getFormData('site_url', OpenSms::FORM_POST_METHOD); ?>
* Time: 3:34 PM */ ?> <!-- Content Header (Page header) --> <section class="content-header"> <h1> SMS <small>Sent Messages</small> </h1> <ol class="breadcrumb"> <li><a href="<?php echo OpenSms::getActionUrl('Index', 'Compose'); ?> ">SMS</a> </li> <li><a href="<?php echo OpenSms::getActionUrl('Index'); ?> ">Sent Messages</a> </li> <li class="active"><i class="fa fa-envelope"></i> Sent Messages</li> </ol> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-md-12"> <div class="box box-primary"> <div class="box-header"> <h3>SMS Report</h3> </div>
</table> <?php } ?> </div> </div><!-- /.box --> </div><!-- /.col --> <div class="col-md-4"> <div class="box box-primary"> <form action="<?php echo OpenSms::getActionUrl('addContact', '*', 'group', ['parameter1' => $this->data['group']->Id]); ?> " method="post"> <div class="box-header"> <i class="fa fa-plus-square"></i> <h3 class="box-title">Add Contacts</h3> <!-- tools box --> <div class="pull-right box-tools"> <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button> <button class="btn btn-info btn-sm btn-danger" data-widget="remove" data-toggle="tooltip" title="Remove"> <i class="fa fa-times"></i> </button> </div><!-- /. tools --> </div> <div class="box-body">
/** * Created by Ademu Anthony. * User: Tony * Date: 3/20/2015 * Time: 3:34 PM */ ?> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Account <small>Transactions</small> </h1> <ol class="breadcrumb"> <li><a href="<?php echo OpenSms::getActionUrl('index', 'account', 'account'); ?> "><i class="fa fa-user"></i> Account</a></li> <li class="active">Transactions</li> </ol> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-md-12"> <div class="box box-primary">
<?php /** * Created by PhpStorm. * User: Gabriel * Date: 3/20/2015 * Time: 2:03 AM */ ?> <!-- Logo --> <a href="/admin/install" class="logo"><?php echo OpenSms::getSystemSetting(OpenSms::SITE_NAME); ?> </a> <!-- Header Navbar: style can be found in header.less --> <nav class="navbar navbar-static-top" role="navigation"> <!-- Sidebar toggle button--> <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button"> <span class="sr-only">Toggle navigation</span> </a> <div class="navbar-custom-menu"> <ul class="nav navbar-nav"> <!-- Messages: style can be found in dropdown.less--> <li class="dropdown messages-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-envelope-o"></i> <span class="label label-success">4</span> </a> <ul class="dropdown-menu"> <li class="header">You have 4 messages</li>
</div><!-- /.box --> </div><!--/.col (right) --> <?php if ($this->data['success']) { ?> <!-- left column --> <div class="col-md-6"> <!-- general form elements --> <div class="box box-primary"> <div class="box-header"> <h3 class="box-title">Admin Login</h3> </div><!-- /.box-header --> <!-- form start --> <form role="form" action="<?php echo OpenSms::getActionUrl('login', 'account', 'account'); ?> " method="post"> <div class="box-body"> <div class="form-group"> <label for="exampleInputEmail1">Username</label> <input type="text" class="form-control" id="username" required="required" name="username" value="<?php echo $this->getFormData('username', OpenSms::FORM_POST_METHOD); ?> " placeholder="Admin Username"> </div> <div class="form-group"> <label for="exampleInputPassword1">Password</label> <input type="password" required="required" class="form-control" id="site_url" name="admin_password" placeholder="Admin Password">
public function Logout() { unset($_SESSION['loginId']); unset($_SESSION['role']); OpenSms::redirectToAction('login'); }
echo OpenSms::getActionUrl('Index', 'Dashboard', 'Admin'); ?> "><i class="fa fa-dashboard"></i> Dashboard</a></li> <li><a href="<?php echo OpenSms::getActionUrl('Index', 'Modules', 'Admin'); ?> ">Modules</a></li> <li class="active">Detail</li> </ol> </section> <!-- Main content --> <section class="content"> <form method="post"action="<?php echo OpenSms::getActionUrl('Update'); ?> "> <input type="hidden" name="name" value="<?php echo $this->data['module']->name; ?> "> <div class="row"> <div class="col-md-4 col-md-offset-8"> <div class="box box-default"> <div class="box-body"> <div class="row"> <div class="col-md-6"> <input type="submit" class="btn btn-primary btn-lg"
<section class="content"> <div class="row"> <div class="col-md-12"> <div class="box box-primary"> <div class="box-header"> <h3>Compose Message <small>(SMS Balance = <?php echo $this->data['user']->Balance; ?> )</small></h3> </div> <div class="box-body"> <form role="form" enctype="multipart/form-data" id="compose_message" method="post" action="<?php echo OpenSms::getActionUrl('send'); ?> "> <fieldset class="fancy"> <div class="form-group"> <label for="sender">Sender</label> <input type="text" class="form-control" name="sender" id="sender" value="" maxlength="11"> </div> <label for="recipient">Recepients:</label> <!-- Nav tabs --> <ul class="nav nav-tabs" role="tablist"> <li class="active"><a href="#enterNumbers" role="tab" data-toggle="tab">Enter Numbers</a></li> <li><a href="#selectGroup" role="tab" data-toggle="tab">Select Group</a></li>
public function deleteContact($groupId, $contactId) { $this->checkLogin(); $c2d = $this->loadModel('OpenSms_Model_Contact', [0 => $contactId]); $notification = $c2d->Delete(); $error_code = $notification == 'One number deleted' ? 0 : 1; $this->setNotification($notification, 'delete_contact'); OpenSms::redirectToAction('detail', '*', 'group', ['parameter1' => $groupId]); }