示例#1
0
 public function __construct($id)
 {
     parent::__construct(eod::DB_TABLE_NAME, eod::DB_UNIQUE_ID);
     $this->set_variable(eod::DB_UNIQUE_ID, $id);
     if (!$this->load()) {
         // doesn't exist, create a new one with yesterdays date.
         $yesterday = date('Y-m-d H:i:s', time() - 60 * 60 * 24);
         $this->set_variable('eod_date', $yesterday);
         $this->createNew();
     }
 }
 public function __construct()
 {
     parent::__construct(ticker_history::DB_TABLE_NAME, ticker_history::DB_UNIQUE_ID);
 }
 public function __construct()
 {
     parent::__construct(highlights::DB_TABLE_NAME, highlights::DB_UNIQUE_ID);
 }
 public function buildTable($options, $allowEdit = null, $deleteToFirstUnderscore = true, $orderBy = "")
 {
     $retStr = "<form name='postable' action='#' method='post'><table id='" . $this->dbName . "' class='openEditTable' >";
     $rowHeader = "<thead><tr>";
     $rowId = "";
     $createHeader = true;
     $allRowsStr = "<tbody>";
     $this->variables = genericTable::GetVariableArray($this, $options, $deleteToFirstUnderscore);
     while ($this->loadNext('', $orderBy)) {
         $rowStr = "<tr id='{{ROWID}}'>";
         $id = $this->get_variable($this->unique_id);
         foreach ($this->variables as $key => $value) {
             if ($createHeader) {
                 if ($key != $this->unique_id && isset($this->variables[$key])) {
                     $keyVals = split("_", $key);
                     if ($deleteToFirstUnderscore) {
                         array_shift($keyVals);
                     }
                     $rowHeader .= "<th>" . implode($keyVals) . "</th>";
                 }
             }
             if ($key == $this->unique_id) {
                 $rowId = $value;
             } else {
                 if (isset($this->variables[$key]) && isset($allowEdit[$key])) {
                     $rowStr .= "<td><input type='text' name='" . $key . "_" . $id . "' value='" . $value . "'></td>";
                 } else {
                     $rowStr .= "<td class='border'>" . $value . "</td>";
                 }
             }
         }
         $rowStr = str_replace("{{ROWID}}", $rowId, $rowStr);
         $rowStr .= "</tr>";
         $allRowsStr .= $rowStr;
         $createHeader = false;
     }
     $allRowsStr .= "</tbody>";
     $rowHeader .= "</tr></thead>";
     $retStr .= $rowHeader . $allRowsStr . "</table><input type='submit' value='Submit'></form>";
     return $retStr;
 }
示例#5
0
 public function __construct()
 {
     parent::__construct(user::DB_TABLE_NAME, user::DB_UNIQUE_ID);
 }
示例#6
0
 public function __construct()
 {
     parent::__construct(referral::DB_TABLE_NAME, referral::DB_UNIQUE_ID);
 }
示例#7
0
 public function __construct()
 {
     parent::__construct(admins::DB_TABLE_NAME, admins::DB_UNIQUE_ID);
 }
 public function __construct()
 {
     parent::__construct(authaccess::DB_TABLE_NAME, authaccess::DB_UNIQUE_ID);
 }
示例#9
0
 public function __construct()
 {
     parent::__construct(watchlist::DB_TABLE_NAME, watchlist::DB_UNIQUE_ID);
 }
示例#10
0
 public function __construct()
 {
     parent::__construct(holdings::DB_TABLE_NAME, holdings::DB_UNIQUE_ID);
 }
 public function __construct()
 {
     parent::__construct(paypal_transaction::DB_TABLE_NAME, paypal_transaction::DB_UNIQUE_ID);
 }
示例#12
0
 public function __construct()
 {
     parent::__construct(moodhistory::DB_TABLE_NAME, moodhistory::DB_UNIQUE_ID);
 }
 public function __construct()
 {
     parent::__construct(transactions::DB_TABLE_NAME, transactions::DB_UNIQUE_ID);
 }
示例#14
0
 public function __construct()
 {
     parent::__construct(crew::DB_TABLE_NAME, crew::DB_UNIQUE_ID);
 }