示例#1
0
 public function is()
 {
     if (!HelperClass::fileExists($this->fileName)) {
         return false;
     }
     if (filemtime($this->fileName) < time() - $this->holdTime) {
         unlink($this->fileName);
         return false;
     }
     return true;
 }
示例#2
0
 public function getCurrentInfo()
 {
     if (isset($this->currentInfo)) {
         return $this->currentInfo;
     }
     $this->currentInfo = null;
     if (HelperClass::fileExists($this->options['cache'] . $this->options['versionFile'])) {
         $fileContent = file_get_contents($this->options['cache'] . $this->options['versionFile']);
         $current = json_decode($fileContent, true);
         foreach ($this->allRelease as $release) {
             if (isset($current['id']) && $current['id'] == $release['id']) {
                 $this->currentInfo = $release;
                 break;
             }
             if (isset($current['tag_name']) && $current['tag_name'] == $release['tag_name']) {
                 $this->currentInfo = $release;
                 break;
             }
         }
     }
     return $this->currentInfo;
 }
 public function __construct()
 {
     $this->account_id = HelperClass::getAccountID();
     $this->errors = array('project_name' => array('error' => 0, 'message' => 'Project name is not valid. Use letters and numbers only.'), 'project_exists' => array('error' => 0, 'message' => 'A project with this name already exists.'), 'instructor' => array('error' => 0, 'message' => 'Facilitator name is not valid. Use letters, numbers, dashes, and periods only.'), 'project_description' => array('error' => 0, 'message' => 'Project description must be at least 100 characters.'), 'project_due_date_invalid' => array('error' => 0, 'message' => 'Please select a valid date.'), 'empty' => array('error' => 0, 'message' => 'A required field was left empty.'), 'file_size_rejected_by_server' => array('error' => 0, 'message' => 'The file size is too large. Please ensure your file is 2 megabytes or less in size'), 'file_invalid_extension' => array('error' => 0, 'message' => 'Invalid file extension.'), 'file_disk_write_error' => array('error' => 0, 'message' => 'The file could not be uploaded to the server. Please try again in a few minutes'));
 }
示例#4
0
                                                         value="<?php 
HelperClass::isset_echo($_POST, 'facilitator');
?>
" />
                                                  <span class="help-block">A facilitator is a professor or business representative</span>
                                             </div>

                                        </div>
                                        <!-- Input Field ::: Facilitator -->

                                        <!-- Input Field ::: Calendar -->
                                        <div class="form-group">
                                             <label for="project_due_date" class="col-lg-2 control-label">Due Date</label>
                                             <div class="col-lg-3">
                                                  <input type="text" class="form-control" name="projectDueDate" value="<?php 
HelperClass::isset_echo($_POST, 'projectDueDate');
?>
">
                                             </div>
                                        </div>
                                        <!-- Input Field ::: Calendar -->

                                   </div>
                                   <!-- Pannel :: Body -->

                              </div>
                              <!-- Panel :: Project Information -->



                              <!-- Panel :: Project Description -->