Exemple #1
0
 function setCode()
 {
     $db = new DB_Sql();
     $random_code = vih_random_code(12);
     $db->query("SELECT * FROM kortkursus_tilmelding WHERE code = '" . $random_code . "'");
     if ($db->numRows() > 0) {
         $random_code = vih_random_code(12);
     }
     $db->query("UPDATE kortkursus_tilmelding SET code = '" . $random_code . "' WHERE id = " . $this->id);
     $this->load();
     return true;
 }
Exemple #2
0
 /**
  * Used to set the session id if the order does not have one, and the user needs to
  * continue the submission
  *
  * @deprecated Should only be used rarely
  *
  * @return boolean
  */
 function setSessionId()
 {
     $db = new DB_Sql();
     $db->query("UPDATE langtkursus_tilmelding SET date_updated = NOW(), session_id = '" . vih_random_code(28) . "' WHERE id = '" . $this->id . "'");
     $this->load();
     return true;
 }