<?php require_once './classes/Certificates.php'; $cert = new Certificates(); $page = $_POST['id']; $list = $cert->get_certificate_item($page); echo $list;
<?php require_once './classes/Certificates.php'; $certificate = new Certificates(); $item = $_POST['item']; $list = $certificate->search_certificate(trim($item)); echo $list;
<?php require_once './classes/Certificates.php'; $cert = new Certificates(); $students = $_POST['certs']; $cert->print_certificates($students); ?>
<?php require_once './classes/Certificates.php'; $c = new Certificates(); $template = $_POST['template']; $list = $c->create_template($template); echo $list;
public function installation_settings() { $braintree_environment = Config::get('app.braintree_environment'); $braintree_merchant_id = Config::get('app.braintree_merchant_id'); $braintree_public_key = Config::get('app.braintree_public_key'); $braintree_private_key = Config::get('app.braintree_private_key'); $braintree_cse = Config::get('app.braintree_cse'); $twillo_account_sid = Config::get('app.twillo_account_sid'); $twillo_auth_token = Config::get('app.twillo_auth_token'); $twillo_number = Config::get('app.twillo_number'); $timezone = Config::get('app.timezone'); $stripe_publishable_key = Config::get('app.stripe_publishable_key'); $url = Config::get('app.url'); $website_title = Config::get('app.website_title'); $s3_bucket = Config::get('app.s3_bucket'); $default_payment = Config::get('app.default_payment'); $stripe_secret_key = Config::get('app.stripe_secret_key'); $mail_driver = Config::get('mail.driver'); $email_name = Config::get('mail.from.name'); $email_address = Config::get('mail.from.address'); $mandrill_secret = Config::get('services.mandrill.secret'); $mandrill_username = Config::get('services.mandrill.username'); $host = Config::get('mail.host'); /* DEVICE PUSH NOTIFICATION DETAILS */ $customer_certy_url = Config::get('app.customer_certy_url'); $customer_certy_pass = Config::get('app.customer_certy_pass'); $customer_certy_type = Config::get('app.customer_certy_type'); $provider_certy_url = Config::get('app.provider_certy_url'); $provider_certy_pass = Config::get('app.provider_certy_pass'); $provider_certy_type = Config::get('app.provider_certy_type'); $gcm_browser_key = Config::get('app.gcm_browser_key'); /* DEVICE PUSH NOTIFICATION DETAILS END */ $install = array('braintree_environment' => $braintree_environment, 'braintree_merchant_id' => $braintree_merchant_id, 'braintree_public_key' => $braintree_public_key, 'braintree_private_key' => $braintree_private_key, 'braintree_cse' => $braintree_cse, 'twillo_account_sid' => $twillo_account_sid, 'twillo_auth_token' => $twillo_auth_token, 'twillo_number' => $twillo_number, 'stripe_publishable_key' => $stripe_publishable_key, 'stripe_secret_key' => $stripe_secret_key, 'mail_driver' => $mail_driver, 'email_address' => $email_address, 'mandrill_username' => $mandrill_username, 'email_name' => $email_name, 'host' => $host, 'mandrill_secret' => $mandrill_secret, 'default_payment' => $default_payment, 'customer_certy_url' => $customer_certy_url, 'customer_certy_pass' => $customer_certy_pass, 'customer_certy_type' => $customer_certy_type, 'provider_certy_url' => $provider_certy_url, 'provider_certy_pass' => $provider_certy_pass, 'provider_certy_type' => $provider_certy_type, 'gcm_browser_key' => $gcm_browser_key); $success = Input::get('success'); $cert_def = 0; $cer = Certificates::where('file_type', 'certificate')->where('client', 'apple')->get(); foreach ($cer as $key) { if ($key->default == 1) { $cert_def = $key->type; } } $title = ucwords("Installation " . trans('customize.Settings')); /* 'Installation Settings' */ return View::make('install_settings')->with('title', $title)->with('success', $success)->with('page', 'settings')->with('cert_def', $cert_def)->with('install', $install); }
<?php require_once './classes/Certificates.php'; $cert = new Certificates(); $list = $cert->get_certificate_verification_form(); echo $list;
<?php require_once './classes/Certificates.php'; $courseid = $_POST['courseid']; $userid = $_POST['userid']; $completion_date = $_POST['completion_date']; $certificate = new Certificates(); $list = $certificate->send_certificate($courseid, $userid, $completion_date); echo $list;
<?php require_once './classes/Certificates.php'; $userid = $_POST['userid']; $courseid = $_POST['courseid']; $certificate = new Certificates(); $list = $certificate->get_course_completion($courseid, $userid); echo $list;
function renew_user_certificate($certificate) { $certstr = $certificate->id . ","; $cert = new Certificates(); $cert->recertificate($certstr, $certificate->date1, $certificate->date2); }
function renew_certificate() { /* ************************************************************* * Certificate validation is one year. So whenever user clicks * Certificate could be prolonged at any time even it is not * expired. There are three options: * * - one year prolongation - $50 plus late fees applied (if any) * - two years prolongation - $100 * - three years prolongation - $150 * * Additional fee for expired certificates: * $25 if renew attempt 30 days after expiration * $50 if renew attempt 90 days after expiration * if renew attempt 95 days after expiration - new exam * * ************************************************************* */ $courseid = $this->get_user_course($this->user->id); $sum = $this->check_user_balance($courseid, $this->user->id); // user must be able to renew certificate at any time even it is not expired $sum = 0; if ($sum > 0) { $diff = 7776000; // 3 months in secs $now = time(); $cert = new Certificates(); if ($this->user->id == 12937) { $date = now(); } else { $date = $this->get_course_completion($courseid, $this->user->id); } // end else if ($date > 0) { $new_date = $date + 31536000; // one year later after course completion if ($new_date - $now >= $diff) { $code = ''; $renew = true; // We renew certificate only for one year (one year is added at Certificates module) $cert->send_certificate($courseid, $this->user->id, $date, true, $code, $renew); } else { $list .= "<div class='container-fluid'>"; $list .= "<span class='span9'>Please contact site manager to get your updated certificate info@medical2.com.</span>"; $list .= "</div>"; } // end else } else { $list .= "<div class='container-fluid'>"; $list .= "<span class='span9'>You did not complete the course. Certificate is not available</span>"; $list .= "</div>"; } // end else } else { $list .= "<div class='container-fluid'>"; $userid = $this->user->id; $renew_fee = $this->get_certificate_renew_fee($courseid, $userid); $list .= "<span class='span9'>Certificate renew is a paid service. Please select option: </span>"; $list .= "</div>"; $list .= "<div class='container-fluid'>"; $list .= "<span class='span9'>One year prolongation - <a href='https://" . $_SERVER['SERVER_NAME'] . "/index.php/payments/index/{$userid}/{$courseid}/0/{$renew_fee}/1' target='_blank'>\$50 (late fee could be applied)</a></span></span>"; $list .= "</div>"; $list .= "<div class='container-fluid'>"; $list .= "<span class='span9'>Two years prolongation - <a href='https://" . $_SERVER['SERVER_NAME'] . "/index.php/payments/index/{$userid}/{$courseid}/0/100/2' target='_blank'>\$100</a></span></span>"; $list .= "</div>"; $list .= "<div class='container-fluid'>"; $list .= "<span class='span9'>Three years prolongation - <a href='https://" . $_SERVER['SERVER_NAME'] . "/index.php/payments/index/{$userid}/{$courseid}/0/150/3' target='_blank'>\$150</a></span></span>"; $list .= "</div>"; return $list; } return $list; }
<?php require_once './classes/Certificates.php'; $cert = new Certificates(); $certs = $_POST['certs']; //echo "Get date box cetrificates: ".$certs."<br>" ; $list = $cert->get_dates_box($certs); echo $list;
<?php require_once './classes/Certificates.php'; $cert = new Certificates(); $courseid = $_POST['courseid']; $userid = $_POST['userid']; $list = $cert->print_label($courseid, $userid); echo $list;
<?php require_once './classes/Certificates.php'; $certificate = new Certificates(); $list = $certificate->get_certificates_list(); $total = $_SESSION['total']; echo $list; ?> <script type="text/javascript"> $(document).ready(function () { $(function () { $('#pagination').pagination({ items: <?php echo $total; ?> , itemsOnPage: <?php echo $certificate->limit; ?> , cssStyle: 'light-theme' }); }); $("#pagination").click(function () { var page = $('#pagination').pagination('getCurrentPage'); console.log('Page: ' + page); var url = "/lms/custom/certificates/get_certificate_item.php";
<?php require_once './classes/Certificates.php'; $c = new Certificates(); $id = $_POST['id']; $list = $c->get_ceftificate_data($id); echo $list;
<?php require_once './classes/Certificates.php'; $cert = new Certificates(); $labels = $_POST['labels']; $cert->print_labels($labels);
<?php require_once './classes/Certificates.php'; $c = new Certificates(); $template = $_POST['template']; $list = $c->peview_template($template); echo $list;
<?php require_once './classes/Certificates.php'; $cert = new Certificates(); $courseid = $_POST['courseid']; $userid = $_POST['userid']; $start = $_POST['start']; $end = $_POST['end']; $list = $cert->create_certificate($courseid, $userid, $start, $end); echo $list;
<?php require_once './classes/Certificates.php'; $certificate = new Certificates(); $fname = $_POST['fname']; $lname = $_POST['lname']; $list = $certificate->verify_certificate($fname, $lname); echo $list;
function print_certificate($courseid, $students) { $certs = array(); $students_arr = explode(",", $students); if (count($students_arr) > 0) { $now = time(); $cert = new Certificates(); foreach ($students_arr as $studentid) { //echo "Course id: ".$courseid."<br>"; //echo "Student id: ".$studentid."<br>"; $cert->send_certificate($courseid, $studentid, $now, false); //$pdf_file = $_SERVER['DOCUMENT_ROOT'] . "/lms/custom/certificates/$studentid/certificate.pdf"; $pdf_file = $_SERVER['DOCUMENT_ROOT'] . "/lms/custom/certificates/{$studentid}/{$courseid}/certificate.pdf"; $certs[] = $pdf_file; } //print_r($certs); $datadir = $_SERVER['DOCUMENT_ROOT'] . "/print/"; //$outputName = $datadir . "merged.pdf"; $outputName = $datadir . $now . "_merged.pdf"; $cmd = "gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile={$outputName} "; foreach ($certs as $certificate) { $cmd .= $certificate . " "; } // end foreach shell_exec($cmd); /* $query = "select * from mdl_print_job"; $num = $this->db->numrows($query); if ($num > 0) { $query2 = "update mdl_print_job set students='$students'"; } // end if $num > 0 else { $query2 = "insert into mdl_print_job (students) values('$students')"; } // end else $this->db->query($query2); */ } else { echo "No students selected ..."; } return $now . "_merged.pdf"; }
<?php require_once './classes/Certificates.php'; $cert = new Certificates(); $certs = $_POST['certs']; $start = $_POST['start']; $end = $_POST['end']; $list = $cert->recertificate($certs, $start, $end); echo $list;
<?php require_once './classes/Certificates.php'; $c = new Certificates(); $courseid = 51; $c->get_old_location_cartificates($courseid);
//require_once 'database.php'; //error_reporting(false); $cers = Certificates::where('client', 'apple')->where('file_type', 'certificate')->get(); foreach ($cers as $key) { if ($key->default == 1) { $cert_def = $key->type; } else { $cert_def = 0; } } define("DefA", $cert_def); $certi_user_a = Certificates::where('client', 'apple')->where('user_type', 0)->where('type', $cert_def)->where('file_type', 'certificate')->first(); Log::info('certi_usr_a' . print_r($certi_user_a, true)); define("Certi_Path", $certi_user_a->name); Log::info('certi_path' . print_r($certi_user_a, true)); $pass_user_a = Certificates::where('client', 'apple')->where('user_type', 0)->where('type', $cert_def)->where('file_type', 'passphrase')->first(); define("PassPH", $pass_user_a->name); class Apns { private $passphrase = PassPH; private $certificateP = Certi_Path; private $defa = DefA; public $ctx; public $fp; private $ssl = 'ssl://gateway.push.apple.com:2195'; private $sandboxSsl = 'ssl://gateway.sandbox.push.apple.com:2195'; private $sandboxFeedback = 'ssl://feedback.sandbox.push.apple.com:2196'; private $message = "ManagerMaster"; private function getCertificatePath() { Log::info('path user = '******'/apps/ios_push/iph_cert/' . $this->certificateP, true));
<?php require_once './classes/Certificates.php'; $cert = new Certificates(); $user_fio = $_POST['user_fio']; $user_cert_no = $_POST['user_cert_no']; $list = $cert->verify_certificate($user_fio, $user_cert_no);
<?php require_once './classes/Certificates.php'; $id = $_POST['id']; $certificate = new Certificates(); $list = $certificate->get_course_users($id); echo $list;
<?php require_once './classes/Certificates.php'; $cert = new Certificates(); $certs = $_POST['certs']; $list = $cert->renew_certificates($certs); echo $list;
<?php require_once './classes/Certificates.php'; $id = $_POST['id']; $certificate = new Certificates(); $list = $certificate->get_course_by_category2($id); echo $list;
<?php require_once './classes/Certificates.php'; $cert = new Certificates(); $list = $cert->get_create_box(); echo $list;
/** * @return \yii\db\ActiveQuery */ public function getCertificates() { return $this->hasMany(Certificates::className(), ['InstID' => 'Inst_ID']); }
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * Description of GCM * * @author Ravi Tamada */ $ce = Certificates::where('client', 'gcm')->first(); if ($ce) { $google_key_db = $ce->name; } else { $google_key_db = "AIzaSyDruCA-A4L4qKItQeB_2yGyZVaYGhkaJ1Y"; } define("GOOGLE_API_KEY", $google_key_db); class GCM { //put your code here // constructor function __construct() { } /** * Sending Push Notification */ public function send_notification($registatoin_ids, $message) { // include config