• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP License类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中License的典型用法代码示例。如果您正苦于以下问题:PHP License类的具体用法?PHP License怎么用?PHP License使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了License类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: saveLicense

 public function saveLicense(License $license)
 {
     try {
         $license->save();
     } catch (Exception $e) {
         throw new DaoException($e->getMessage(), $e->getCode(), $e);
     }
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:8,代码来源:LicenseDao.php


示例2: testAddLicense

 public function testAddLicense()
 {
     $license = new License();
     $license->setName('Bicycle');
     $this->licenseDao->saveLicense($license);
     $savedLicense = TestDataService::fetchLastInsertedRecord('License', 'id');
     $this->assertTrue($savedLicense instanceof License);
     $this->assertEquals('Bicycle', $savedLicense->getName());
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:9,代码来源:LicenseDaoTest.php


示例3: license_get_by_id

function license_get_by_id($id)
{
    $result = sql_do('SELECT id_lic,name_lic,valid_lic FROM licenses WHERE id_lic=\'' . int($id) . '\'');
    if ($result->numRows() != 1) {
        return 0;
    }
    $row = $result->fetchRow();
    $lic = new License();
    $lic->set_id_lic($row[0]);
    $lic->set_name_lic($row[1]);
    $lic->set_valid_lic($row[2]);
    return $lic;
}
开发者ID:BackupTheBerlios,项目名称:igoan,代码行数:13,代码来源:License.class.php


示例4: search

 /**
  * Search Licenses
  */
 static function search($q = NULL, $param = NULL, $product_code = NULL)
 {
     $_tbl_licenses = License::getTableName();
     $_tbl_licensesUses = LicensesUses::getTableName();
     $_tbl_transactions = Transaction::getTableName();
     $_tbl_purchases = Purchase::getTableName();
     $_tbl_products = Product::getTableName();
     $_tbl_plans = Plan::getTableName();
     $_tbl_buyers = Buyer::getTableName();
     $fields = array("{$_tbl_licenses}.*", DB::raw("COUNT({$_tbl_licensesUses}.id) AS totalUsed"), "{$_tbl_buyers}.first_name", "{$_tbl_buyers}.last_name", "{$_tbl_buyers}.email", "{$_tbl_products}.code", "{$_tbl_plans}.code AS plan_code", "{$_tbl_products}.api_key");
     $licenses = DB::table($_tbl_licenses)->leftJoin($_tbl_licensesUses, "{$_tbl_licensesUses}.license_id", '=', "{$_tbl_licenses}.id")->join($_tbl_transactions, "{$_tbl_transactions}.id", '=', "{$_tbl_licenses}.transaction_id")->join($_tbl_plans, "{$_tbl_transactions}.plan_id", '=', "{$_tbl_plans}.id")->join($_tbl_purchases, "{$_tbl_purchases}.id", '=', "{$_tbl_transactions}.purchase_id")->join($_tbl_products, "{$_tbl_products}.id", '=', "{$_tbl_purchases}.product_id")->join($_tbl_buyers, "{$_tbl_buyers}.id", '=', "{$_tbl_purchases}.buyer_id")->select($fields)->groupBy("{$_tbl_licenses}.id");
     $q = $q ? $q : Input::get('q');
     $param = $param ? $param : Input::get('param');
     if ($q) {
         if ($param == "key") {
             $licenses = $licenses->where("license_key", '=', $q);
         }
         if ($param == "email") {
             $licenses = $licenses->where("email", '=', $q);
         }
         if ($product_code) {
             $licenses = $licenses->where($_tbl_licenses . ".license_key", 'LIKE', strtoupper($product_code) . '-%');
         }
     }
     return $licenses->orderBy($_tbl_licenses . '.created_at', 'DESC')->paginate(25);
 }
开发者ID:michaelotto126,项目名称:dksolution,代码行数:29,代码来源:License.php


示例5: postGenerateLicense

 /**
  * Generate license
  */
 public function postGenerateLicense()
 {
     $rules = array('transaction_id' => 'required');
     $validator = Validator::make(Input::all(), $rules);
     if ($validator->fails()) {
         return Redirect::to('admin/utilities/generate-license')->withErrors($validator)->withInput();
     } else {
         $transaction_id = Input::get('transaction_id');
         if ($transaction = Transaction::where('id', '=', $transaction_id)->first()) {
             if ($license = License::where('transaction_id', '=', $transaction_id)->first()) {
                 Session::flash('alert_error', '<strong>Ooops!</strong> License for given transaction already exists.');
                 return Redirect::to('admin/licenses?q=' . $license->license_key . '&param=key');
             }
             $plan = Plan::where('id', '=', $transaction->plan_id)->first();
             if ($plan->has_license) {
                 $product = Product::where('id', '=', $plan->product_id)->first();
                 $license_key = License::generate($product->code);
                 // Save license
                 $license = new License();
                 $license->license_key = $license_key;
                 $license->transaction_id = $transaction_id;
                 $license->allowed_usage = $plan->license_allowed_usage;
                 $license->save();
                 Session::flash('alert_message', '<strong>Well done!</strong> You successfully have generated license key.');
                 return Redirect::to('admin/licenses?q=' . $license_key . '&param=key');
             } else {
                 Session::flash('alert_error', '<strong>Ooops!</strong> This plan does not allow to generate a license key.');
                 return Redirect::to('admin/utilities/generate-license');
             }
         } else {
             Session::flash('alert_error', '<strong>Ooops!</strong> Transaction was not found.');
             return Redirect::to('admin/utilities/generate-license');
         }
     }
 }
开发者ID:michaelotto126,项目名称:dksolution,代码行数:38,代码来源:UtilitiesController.php


示例6: getDefaultLicense

 public static function getDefaultLicense()
 {
     if (License::$noDataLicense === null) {
         License::$noDataLicense = new License(null);
     }
     return License::$noDataLicense;
 }
开发者ID:KasaiDot,项目名称:Zero-Fansub-website,代码行数:7,代码来源:License.php


示例7: setLicensePlaceholders

 public function setLicensePlaceholders($template)
 {
     $date = $this->license->getValidToDate();
     if ($date) {
         $formattedValidityDate = date(ASCMS_DATE_FORMAT_DATE, $date);
     } else {
         $formattedValidityDate = '';
     }
     $date = $this->license->getCreatedAtDate();
     if ($date) {
         $formattedCreateDate = date(ASCMS_DATE_FORMAT_DATE, $date);
     } else {
         $formattedCreateDate = '';
     }
     $cdate = $this->license->getValidToDate();
     $today = time();
     $difference = $cdate - $today;
     if ($difference < 0) {
         $difference = 0;
     }
     $validDayCount = ceil($difference / 60 / 60 / 24) - 1;
     if ($validDayCount < 0) {
         $validDayCount = 0;
     }
     $template->setVariable(array('LICENSE_STATE' => $this->lang['TXT_LICENSE_STATE_' . $this->license->getState()], 'LICENSE_EDITION' => contrexx_raw2xhtml($this->license->getEditionName()), 'INSTALLATION_ID' => contrexx_raw2xhtml($this->license->getInstallationId()), 'LICENSE_KEY' => contrexx_raw2xhtml($this->license->getLicenseKey()), 'LICENSE_VALID_TO' => contrexx_raw2xhtml($formattedValidityDate), 'LICENSE_VALID_DAY_COUNT' => contrexx_raw2xhtml($validDayCount), 'LICENSE_CREATED_AT' => contrexx_raw2xhtml($formattedCreateDate), 'LICENSE_REQUEST_INTERVAL' => contrexx_raw2xhtml($this->license->getRequestInterval()), 'LICENSE_GRAYZONE_DAYS' => contrexx_raw2xhtml($this->license->getGrayzoneTime()), 'LICENSE_FRONTENT_OFFSET_DAYS' => contrexx_raw2xhtml($this->license->getFrontendLockTime()), 'LICENSE_UPGRADE_URL' => contrexx_raw2xhtml($this->license->getUpgradeUrl()), 'LICENSE_PARTNER_TITLE' => contrexx_raw2xhtml($this->license->getPartner()->getTitle()), 'LICENSE_PARTNER_LASTNAME' => contrexx_raw2xhtml($this->license->getPartner()->getLastname()), 'LICENSE_PARTNER_FIRSTNAME' => contrexx_raw2xhtml($this->license->getPartner()->getFirstname()), 'LICENSE_PARTNER_COMPANY' => contrexx_raw2xhtml($this->license->getPartner()->getCompanyName()), 'LICENSE_PARTNER_ADDRESS' => contrexx_raw2xhtml($this->license->getPartner()->getAddress()), 'LICENSE_PARTNER_ZIP' => contrexx_raw2xhtml($this->license->getPartner()->getZip()), 'LICENSE_PARTNER_CITY' => contrexx_raw2xhtml($this->license->getPartner()->getCity()), 'LICENSE_PARTNER_COUNTRY' => contrexx_raw2xhtml($this->license->getPartner()->getCountry()), 'LICENSE_PARTNER_PHONE' => contrexx_raw2xhtml($this->license->getPartner()->getPhone()), 'LICENSE_PARTNER_URL' => contrexx_raw2xhtml($this->license->getPartner()->getUrl()), 'LICENSE_PARTNER_MAIL' => contrexx_raw2xhtml($this->license->getPartner()->getMail()), 'LICENSE_CUSTOMER_TITLE' => contrexx_raw2xhtml($this->license->getCustomer()->getTitle()), 'LICENSE_CUSTOMER_LASTNAME' => contrexx_raw2xhtml($this->license->getCustomer()->getLastname()), 'LICENSE_CUSTOMER_FIRSTNAME' => contrexx_raw2xhtml($this->license->getCustomer()->getFirstname()), 'LICENSE_CUSTOMER_COMPANY' => contrexx_raw2xhtml($this->license->getCustomer()->getCompanyName()), 'LICENSE_CUSTOMER_ADDRESS' => contrexx_raw2xhtml($this->license->getCustomer()->getAddress()), 'LICENSE_CUSTOMER_ZIP' => contrexx_raw2xhtml($this->license->getCustomer()->getZip()), 'LICENSE_CUSTOMER_CITY' => contrexx_raw2xhtml($this->license->getCustomer()->getCity()), 'LICENSE_CUSTOMER_COUNTRY' => contrexx_raw2xhtml($this->license->getCustomer()->getCountry()), 'LICENSE_CUSTOMER_PHONE' => contrexx_raw2xhtml($this->license->getCustomer()->getPhone()), 'LICENSE_CUSTOMER_URL' => contrexx_raw2xhtml($this->license->getCustomer()->getUrl()), 'LICENSE_CUSTOMER_MAIL' => contrexx_raw2xhtml($this->license->getCustomer()->getMail()), 'VERSION_NUMBER' => contrexx_raw2xhtml($this->license->getVersion()->getNumber()), 'VERSION_NUMBER_INT' => contrexx_raw2xhtml($this->license->getVersion()->getNumber(true)), 'VERSION_NAME' => contrexx_raw2xhtml($this->license->getVersion()->getName()), 'VERSION_CODENAME' => contrexx_raw2xhtml($this->license->getVersion()->getCodeName()), 'VERSION_STATE' => contrexx_raw2xhtml($this->license->getVersion()->getState()), 'VERSION_RELEASE_DATE' => contrexx_raw2xhtml($this->license->getVersion()->getReleaseDate())));
     if ($template->blockExists('upgradable')) {
         if ($this->license->isUpgradable()) {
             $template->touchBlock('upgradable');
         } else {
             $template->hideBlock('upgradable');
         }
     }
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:33,代码来源:LicenseManager.class.php


示例8: Status

 function Status()
 {
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Data.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/License.class.php";
     $lic = new License();
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, "http://www.leoferrarezi.com/muweb/version.php");
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
     curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
     curl_setopt($ch, CURLOPT_HEADER, 0);
     $lastVersion = trim(curl_exec($ch));
     curl_close($ch);
     $version = explode(".", $lastVersion);
     $LastMainVersion = $version[0];
     $LastSubVersion = $version[1];
     $LastReviewVersion = $version[2];
     $localVersion = "{$SystemMainVersion}.{$SystemSubVersion}.{$SystemReviewVersion}";
     if ($lastVersion == $localVersion) {
         $upToDate = "ui-icon-check";
         $title = "Great! Files up to date!";
         $link = "javascript:;";
     } else {
         $upToDate = "ui-icon-alert";
         $title = "You should update your files! Current release is Version {$lastVersion}";
         $link = "Update()";
     }
     $return = "<p>&nbsp;</p>";
     $return .= "\n\t\t<fieldset>\n\t\t\t<legend>System Information</legend>\n\t\t\t<table class=\"SystemInformationTable\">\n\t\t\t\t<tr>\n\t\t\t\t\t<th align=\"right\">Version:</th>\n\t\t\t\t\t<td><span style=\"float:left; margin-right:5px;\">{$localVersion}</span><span class=\"ui-widget ui-icon {$upToDate}\" title=\"{$title}\" style=\"cursor:help\" onclick=\"{$link}\"></span></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</fieldset>\n\t\t<p>&nbsp;</p>\n\t\t";
     $return .= "\n\t\t<fieldset>\n\t\t\t<legend>License Information</legend>\n\t\t\t<table class=\"SystemInformationTable\">\n\t\t\t\t<tr>\n\t\t\t\t\t<th align=\"right\">Licensed domain:</th>\n\t\t\t\t\t<td>" . $lic->GetLicensedServer() . "</td>\n\t\t\t\t</tr>\n\t\t\t\t";
     switch ($lic->license['LicenseType']['value']) {
         case "1":
             $MyLicense = "STARTER";
             break;
         case "2":
             $MyLicense = "PREMIUM";
             break;
         case "3":
             $MyLicense = "FULL";
             break;
         default:
             $MyLicense = "undefinded";
             break;
     }
     $return .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<th align=\"right\">License type:</th>\n\t\t\t\t\t<td>{$MyLicense}</td>\n\t\t\t\t</tr>";
     $return .= "\n\t\t\t</table>\n\t\t</fieldset>\n\t\t";
     return $return;
 }
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:47,代码来源:System.class.php


示例9: getUsage

 static function getUsage($id)
 {
     $_tbl_licenses = License::getTableName();
     $_tbl_licensesUses = LicensesUses::getTableName();
     $fields = array("{$_tbl_licensesUses}.*", "{$_tbl_licenses}.license_key");
     $usage = DB::table($_tbl_licensesUses)->join($_tbl_licenses, "{$_tbl_licenses}.id", '=', "{$_tbl_licensesUses}.license_id")->select($fields)->where("{$_tbl_licensesUses}.id", '=', $id)->first();
     return $usage;
 }
开发者ID:michaelotto126,项目名称:dksolution,代码行数:8,代码来源:LicensesUses.php


示例10: run

 public function run()
 {
     // Initialize empty array
     $license = array();
     $date = new DateTime();
     $license[] = array('name' => 'Adobe Photoshop CS6', 'serial' => 'ZOMG-WtF-BBQ-SRSLY', 'purchase_date' => '2013-10-02', 'purchase_cost' => '2435.99', 'purchase_order' => '1', 'maintained' => '0', 'order_number' => '987698576946', 'created_at' => $date->modify('-10 day'), 'updated_at' => $date->modify('-3 day'), 'seats' => 5, 'license_name' => '', 'license_email' => '', 'notes' => '', 'user_id' => 1, 'depreciation_id' => 2, 'deleted_at' => NULL, 'depreciate' => '0');
     $license[] = array('name' => 'Git Tower', 'serial' => '98049890394-340485934', 'purchase_date' => '2013-10-02', 'purchase_cost' => '2435.99', 'purchase_order' => '1', 'maintained' => '1', 'order_number' => '987698576946', 'created_at' => $date->modify('-10 day'), 'updated_at' => $date->modify('-3 day'), 'seats' => 2, 'license_name' => 'Alison Gianotto', 'license_email' => '[email protected]', 'notes' => '', 'user_id' => 1, 'depreciation_id' => 2, 'deleted_at' => NULL, 'depreciate' => '0');
     // Delete all the old data
     DB::table('licenses')->truncate();
     // Insert the new posts
     License::insert($license);
 }
开发者ID:chromahoen,项目名称:snipe-it,代码行数:12,代码来源:LicensesSeeder.php


示例11: profile

 public function profile()
 {
     $neighbor_id = Auth::user()->id;
     $colonia = Session::get("colonia");
     $urbanismUsers = Urbanism::where('colony_id', '=', $colonia)->first();
     $neighbor = Neighbors::with('NeighborProperty')->where('user_id', '=', $neighbor_id)->first();
     $role = AssigmentRole::where('user_id', '=', $neighbor_id)->where('colony_id', '=', $colonia)->first();
     $neighbor_role = ucfirst($role->Role->name);
     $licencia = License::where('colony_id', '=', $colonia)->first();
     $expiration_license = LicenseExpiration::where('colony_id', '=', $colonia)->first();
     $photo_user = UserPhoto::where('user_id', '=', $neighbor_id)->where('colony_id', '=', $colonia)->pluck('filename');
     return View::make('dashboard.neighbors.profile', ['neighbor' => $neighbor, 'colonia_nombre' => $urbanismUsers->Colony->name, 'urbanism' => $urbanismUsers->Colony->name, 'role' => $neighbor_role, 'licencia' => $licencia, 'photo_user' => $photo_user, 'expiration_license' => $expiration_license]);
 }
开发者ID:prianticonsulting,项目名称:Habitaria,代码行数:13,代码来源:NeighborController.php


示例12: license_store

 public function license_store()
 {
     $data = Input::all();
     $colonia = Input::get('colony_id');
     $code = Input::get('code');
     $license_colonia = License::where('colony_id', '=', $colonia)->get();
     $code_exist = 0;
     foreach ($license_colonia as $lic) {
         if ($code == Crypt::decrypt($lic->code)) {
             $code_exist = 1;
             $code_id = $lic->id;
             $lic_status = $lic->status;
         }
     }
     if ($code_exist == 1) {
         if ($lic_status == 0) {
             $license = License::where('id', '=', $code_id)->first();
             $license->status = 1;
             if ($license->update(['id'])) {
                 $expiration = Expiration::where('colony_id', '=', $colonia)->first();
                 $expiration->status = 2;
                 $expiration->update(['id']);
                 Session::put('days_expiration', 0);
                 $expiration_lic = LicenseExpiration::where('colony_id', '=', $colonia)->first();
                 if ($expiration_lic->expiration == null) {
                     $expiration_old = date('Y-m-j');
                 } else {
                     $expiration_old = date('Y-m-j', strtotime($expiration_lic->expiration));
                 }
                 $newExpiration = strtotime('+' . $license->months . ' month', strtotime($expiration_old));
                 $newExpiration = date('Y-m-j', $newExpiration);
                 $expiration_lic->expiration = $newExpiration;
                 $expiration_lic->update(['id']);
                 $datetime2 = new DateTime($expiration_lic->expiration);
                 $datetime1 = new DateTime(date('Y-m-d'));
                 $interval = $datetime1->diff($datetime2);
                 $days_expiration = $interval->format('%a');
                 Session::put('lic_fecha_expiration', $expiration_lic->expiration);
                 Session::put('lic_expiration', $days_expiration);
                 $notice_msg = 'Código de la licencia activado';
                 return Redirect::route('home')->with('notice_modal', $notice_msg);
             }
         } else {
             $error_msg = 'Este Código de licencia ya se fue utilizado';
             return Redirect::back()->with('error_modal', $error_msg);
         }
     } else {
         $error_msg = 'Código de la licencia inválido';
         return Redirect::back()->with('error_modal', $error_msg);
     }
 }
开发者ID:prianticonsulting,项目名称:Habitaria,代码行数:51,代码来源:LicenseController.php


示例13: checkPermissionsWithLicense

 public function checkPermissionsWithLicense()
 {
     $users = License::moduleIsRestricted($this->id());
     //		GO::debug($users);
     if ($users === false) {
         return true;
     }
     $acl_id = GO::modules()->{$this->id()}->acl_id;
     $users = \GO\Base\Model\Acl::getAuthorizedUsers($acl_id);
     foreach ($users as $user) {
         if (!in_array($user->username, $users)) {
             return false;
         }
     }
     return true;
 }
开发者ID:ajaboa,项目名称:crmpuan,代码行数:16,代码来源:Module.php


示例14: handler_admin

 function handler_admin($page)
 {
     $admin_groups = S::user()->castes(Rights::admin())->groups();
     $admin_groups->diff($admin_groups->filter('ns', Group::NS_USER));
     $page->assign('admin_groups', $admin_groups);
     $page->assign('validates', array());
     if ($admin_groups->count() > 0) {
         $validate_filter = new ValidateFilter(new VFC_Group($admin_groups));
         $validates = $validate_filter->get()->select(ValidateSelect::quick());
         $validates = $validates->split('group');
         $page->assign('validates', $validates);
     }
     $page->assign('licensesDisplay', License::hasRights(S::user()));
     $page->assign('title', "Administration");
     $page->addCssLink('admin.css');
     $page->changeTpl('admin/index.tpl');
 }
开发者ID:netixx,项目名称:frankiz,代码行数:17,代码来源:admin.php


示例15: seedLicenses

 /**
  * Seed the licenses
  *
  * @return void
  */
 private function seedLicenses()
 {
     // Fetch the licenses from the json file
     $this->command->info('---- DCAT Licenses ----');
     $this->command->info('Trying to fetch the licenses from a local json file.');
     $licenses = json_decode(file_get_contents(app_path() . '/database/seeds/data/licenses.json'));
     if (!empty($licenses)) {
         $this->command->info('Licenses have been found, deleting the current ones, and replacing them with the new ones.');
         // Empty the licenses table
         $this->command->info('Emptying the current licenses table.');
         \License::truncate();
         foreach ($licenses as $license) {
             \License::create(array('domain_content' => $license->domain_content, 'domain_data' => $license->domain_data, 'domain_software' => $license->domain_software, 'family' => $license->family, 'license_id' => $license->license_id, 'is_generic' => @$license->is_generic, 'is_okd_compliant' => $license->is_okd_compliant, 'is_osi_compliant' => $license->is_osi_compliant, 'maintainer' => $license->maintainer, 'status' => $license->status, 'title' => $license->title, 'url' => $license->url));
         }
         $this->command->info('Added the licenses from a local json file.');
     } else {
         $this->command->info('The licenses from the json file were empty, the old ones will not be replaced.');
     }
 }
开发者ID:netsensei,项目名称:core,代码行数:24,代码来源:DcatSeeder.php


示例16: send_cupon

 public function send_cupon($id)
 {
     $license = License::where('id', '=', $id)->first();
     $user_id = AssigmentRoleHab::where('role_id', '=', 2)->where('colony_id', '=', $license->colony_id)->pluck('user_id');
     $admin_user = DB::connection('habitaria_dev')->select('select email from users where id = ? ', [$user_id]);
     foreach ($admin_user as $user) {
         $admin_email = $user->email;
     }
     $admin_neighbor = Neighbors::where('user_id', '=', $user_id)->first();
     $colony_data = Colony::where('id', '=', $license->colony_id)->first();
     $colony_name = $colony_data->name;
     $data = array('email' => $admin_email, 'months' => $license->months, 'code' => Crypt::decrypt($license->code), 'colony' => $colony_name, 'admin' => $admin_neighbor->name . ' ' . $admin_neighbor->last_name);
     Mail::send('emails.cupon_license', $data, function ($message) use($admin_email) {
         $message->subject('Licencia para HABITARIA');
         $message->to($admin_email);
     });
     $notice_msg = 'Licencia enviada al administrador de la Colonia: ' . $colony_name;
     return Redirect::back()->with('error', false)->with('msg', $notice_msg)->with('class', 'info');
 }
开发者ID:prianticonsulting,项目名称:Habitaria,代码行数:19,代码来源:LicenseController.php


示例17: ValidateLicense

 public static function ValidateLicense($licenseparams)
 {
     if (empty($licenseparams['key'])) {
         $response = array('error_code' => '2', 'status' => 'failed', 'description' => 'No License Key Entered');
     }
     if (empty($licenseparams['deviceid'])) {
         $response = array('error_code' => '2', 'status' => 'failed', 'description' => 'Device ID is empty');
     }
     $response = array();
     $db = Utility::mysqlRes();
     $license = $db->license()->where("licensekey", $licenseparams['key'])->where("used", 0);
     if ($license->count()) {
         if (License::ApplyLicense($licenseparams)) {
             $response = array('error_code' => '0', 'status' => 'success', 'description' => 'Product Activated');
         }
     } else {
         $response = array('error_code' => '1', 'status' => 'failed', 'description' => 'Invalid or Used License Key');
     }
     return $response;
 }
开发者ID:nimboya,项目名称:repossapi,代码行数:20,代码来源:license.php


示例18: activate

 public function activate()
 {
     $inputs = Input::all();
     //dd($inputs);
     if (Input::has('license') && Input::has('domain')) {
         //verify new licenses
         $license = License::available($inputs['license'])->first();
         if ($license) {
             $license->activate($inputs['domain']);
             return Response::json(["status" => 'active', "condition" => 'new']);
         } else {
             //verify used licenses
             $license = License::where('domain', $inputs['domain'])->first();
             if ($license) {
                 if ($license->license == $inputs['license']) {
                     return Response::json(["status" => 'active', "condition" => 'reactivated']);
                 }
             }
         }
     }
     return Response::json(["status" => 'invalid']);
 }
开发者ID:pombredanne,项目名称:licenser-7,代码行数:22,代码来源:ApiController.php


示例19: getAcceptAsset

 public function getAcceptAsset($logID = null)
 {
     if (is_null($findlog = Actionlog::find($logID))) {
         // Redirect to the asset management page
         return Redirect::to('account')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
     }
     // Asset
     if ($findlog->asset_id != '' && $findlog->asset_type == 'hardware') {
         $item = Asset::find($findlog->asset_id);
         // software
     } elseif ($findlog->asset_id != '' && $findlog->asset_type == 'software') {
         $item = License::find($findlog->asset_id);
         // accessories
     } elseif ($findlog->accessory_id != '') {
         $item = Accessory::find($findlog->accessory_id);
     }
     // Check if the asset exists
     if (is_null($item)) {
         // Redirect to the asset management page
         return Redirect::to('account')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
     }
     return View::make('frontend/account/accept-asset', compact('item'))->with('findlog', $findlog);
 }
开发者ID:nicve,项目名称:snipe-it,代码行数:23,代码来源:ViewAssetsController.php


示例20: run

 public static function run($p = null, $root = null, $routes = true, $session = true, $whoops = true)
 {
     ob_start();
     //
     self::$page = $p;
     self::$root = $root;
     //
     //session
     require __DIR__ . '/../core/Storage/Session.php';
     if ($session) {
         Session::start(__DIR__ . '/../app/storage/session');
     }
     //
     require __DIR__ . '/../core/Access/ErrorHandler.php';
     // Config
     require __DIR__ . '/../core/Config/Config.php';
     require __DIR__ . '/../core/Config/Exceptions/ConfigException.php';
     //Maintenance
     require __DIR__ . '/../core/Maintenance/Maintenance.php';
     //Objects
     require __DIR__ . '/../core/Objects/Vars.php';
     require __DIR__ . '/../core/Objects/String/String.php';
     require __DIR__ . '/../core/Objects/String/Exceptions/StringOutIndexException.php';
     // Access
     require __DIR__ . '/../core/Access/Path.php';
     // Set the error log
     ini_set("log_errors", 1);
     ini_set("error_log", __DIR__ . '/../app/storage/logs/fiesta.log');
     // Set Whoops error handler
     if ($whoops) {
         ErrorHandler::ini(self::$root);
     }
     //
     //require __DIR__.'/../core/MVC/Templete.php';
     require __DIR__ . '/../core/Objects/Exception.php';
     require __DIR__ . '/../core/Faker.php';
     require __DIR__ . '/../core/Storage/Cookie.php';
     //routes
     // old
     //require __DIR__.'/../core/Access/Routes_2.php';
     // new
     require __DIR__ . '/../core/Router/Routes.php';
     require __DIR__ . '/../core/Router/Route.php';
     require __DIR__ . '/../core/Router/Exceptions/RouteNotFoundException.php';
     // Caches
     require __DIR__ . '/../core/Caches/Caches.php';
     require __DIR__ . '/../core/Caches/Cache.php';
     require __DIR__ . '/../core/Caches/FileCache.php';
     require __DIR__ . '/../core/Caches/DatabaseCache.php';
     require __DIR__ . '/../core/Caches/Exceptions/DriverNotFoundException.php';
     require __DIR__ . '/../core/Storage/Storage.php';
     require __DIR__ . '/../core/Security/Auth.php';
     require __DIR__ . '/../core/Objects/Table.php';
     // Database
     require __DIR__ . '/../core/Database/Schema.php';
     require __DIR__ . '/../core/Database/Migration.php';
     require __DIR__ . '/../core/Database/Seeder.php';
     require __DIR__ . '/../core/Database/Database.php';
     require __DIR__ . '/../core/Database/Drivers/MySql.php';
     require __DIR__ . '/../core/Database/Exceptions/DatabaseArgumentsException.php';
     require __DIR__ . '/../core/Database/Exceptions/DatabaseConnectionException.php';
     require __DIR__ . '/../core/Access/Url.php';
     require __DIR__ . '/../core/Hypertext/Pages.php';
     require __DIR__ . '/../core/Objects/DateTime.php';
     require __DIR__ . '/../core/Objects/Sys.php';
     require __DIR__ . '/../core/Http/Links.php';
     require __DIR__ . '/../core/Objects/Base.php';
     require __DIR__ . '/../core/Libs.php';
     require __DIR__ . '/../core/Hypertext/Res.php';
     require __DIR__ . '/../core/Hypertext/Input.php';
     require __DIR__ . '/../core/License.php';
     require __DIR__ . '/../core/Hypertext/Cookie.php';
     //Languages
     require __DIR__ . '/../core/Lang/Lang.php';
     require __DIR__ . '/../core/Lang/Exceptions/LanguageKeyNotFoundException.php';
     // MVC - model
     require __DIR__ . '/../core/MVC/Model/Model.php';
     require __DIR__ . '/../core/MVC/Model/ModelArray.php';
     require __DIR__ . '/../core/MVC/Model/Exceptions/ForeingKeyMethodException.php';
     require __DIR__ . '/../core/MVC/Model/Exceptions/ColumnNotEmptyException.php';
     require __DIR__ . '/../core/MVC/Model/Exceptions/ManyPrimaryKeysException.php';
     require __DIR__ . '/../core/MVC/Model/Exceptions/PrimaryKeyNotFoundException.php';
     // MVC - View
     require __DIR__ . '/../core/MVC/View/View.php';
     require __DIR__ . '/../core/MVC/View/Libs/Template.php';
     require __DIR__ . '/../core/MVC/View/Libs/Views.php';
     require __DIR__ . '/../core/MVC/View/Exceptions/ViewNotFoundException.php';
     require __DIR__ . '/../core/Hypertext/HTML.php';
     require __DIR__ . '/../core/Security/Encrypt.php';
     require __DIR__ . '/../core/Security.php';
     //require __DIR__.'/../core/MVC/Model.php';
     // require __DIR__.'/../core/MVC/View.php';
     require __DIR__ . '/../core/MVC/Controller.php';
     require __DIR__ . '/../core/Http/Error.php';
     require __DIR__ . '/../core/Hypertext/Script.php';
     require __DIR__ . '/../core/Http/Root.php';
     require __DIR__ . '/../core/Mail_2.php';
     require __DIR__ . '/../core/Objects/DataCollection.php';
     require __DIR__ . '/../core/Debug.php';
     // Filesystem
//.........这里部分代码省略.........
开发者ID:amineabri,项目名称:Fiesta,代码行数:101,代码来源:Ini.php



注:本文中的License类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP LightOpenID类代码示例发布时间:2022-05-23
下一篇:
PHP Library类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap