Beispiel #1
0
 public function getAvatarsList()
 {
     $Page_Title = "الصور الرمزيه";
     global $db;
     require_once "views/tablelist.php";
     $myTable = new TableView();
     $myTable->addE("id", "id", "`id`");
     $myTable->addElement("الصوره الشخصيه", "imageID", "`imageID`", "<img class=\"img-responsive thumbnail\" src='../image.php?id=", "&t=150x150' />");
     $msg = "هل انت متاكد من حذف الصوره ؟";
     $keyid = "id";
     global $per_page;
     $myFunctions = new TableView();
     $myFunctions->addF("عرض", "View", "v");
     $myFunctions->addF("تعديل", "Edit", "e");
     $myFunctions->addF("حذف", "delete", "d");
     $what = $myTable->returnArray();
     $table = "Avatars";
     $innerJoin = "";
     $getArray = $_GET;
     require "functions/generalFunctions.php";
     $start = getStartPage($getArray, $per_page);
     $db->select($table, "", $limit = $start . "," . $per_page, $order = false, $where_mode = "AND", $print_query = false, $What = "*", $innerJoin);
     $input = $db->result_array();
     include "views/list.php";
 }
Beispiel #2
0
 public function viewFeedbackList()
 {
     $Page_Title = "الشكاوى و المقترحات";
     global $db;
     require_once "views/tablelist.php";
     $myTable = new TableView();
     $myTable->addE("id", "FeedbackID", "`FeedbackID`");
     $myTable->addE("الراسل", "name", "`name`");
     $myTable->addElement("الصوره الشخصيه", "ProfilePic", "`ProfilePic`", "<img class=\"img-responsive thumbnail\" src='../image.php?id=", "&t=150x150' />");
     $myTable->addE("نوع الرساله", "FeedbackType", "`FeedbackType`");
     $myTable->addE("العنوان", "Subject", "`Subject`");
     $myTable->addE("الرسالة", "Message", "`Message`");
     $keyid = "FeedbackID";
     global $per_page;
     $myFunctions = new TableView();
     $myFunctions->addF("عرض", "View", "v");
     $myFunctions->addF("تعديل", "Edit", "e");
     $what = $myTable->returnArray();
     $table = "Feedbacks";
     $innerJoin = "inner join members on members.id=Feedbacks.SenderID";
     $getArray = $_GET;
     require "functions/generalFunctions.php";
     $start = getStartPage($getArray, $per_page);
     $db->select($table, "", $limit = $start . "," . $per_page, $order = false, $where_mode = "AND", $print_query = false, $What = "*", $innerJoin);
     $input = $db->result_array();
     include "views/list.php";
 }
Beispiel #3
0
 public function viewCommentbyNews($newsID)
 {
     global $db;
     $db->select('News', array('NewsID' => $newsID), $limit = false, $order = false, $where_mode = "AND", $print_query = false, $What = "*", $innerJoin = "");
     $news = $db->row_array();
     $Page_Title = "التعليقات على " . $news['Subject'];
     $myFunctions = new TableView();
     $msg = "هل انت متاكد من حذف التعليق ؟";
     $myFunctions->addF("عرض صاحب التعليق ", "View", "v");
     $myFunctions->addF("خذف التعليق", "Delete", "d");
     $myTable = new TableView();
     $myTable->addE("ID", "CommentID", "`CommentID`");
     $myTable->addE("اسم العضو", "name", "`name`");
     $myTable->addE("القبيله", "Gname", "`Gname`");
     $myTable->addElement("الصوره الشخصيه", "ProfilePic", "`ProfilePic`", "<img class=\"img-responsive thumbnail\" src='../image.php?id=", "&t=150x150' />");
     $myTable->addE("التعليق", "comment", "`comment`");
     $keyid = "CommentID";
     global $per_page;
     $what = $myTable->returnArray();
     $where = array('POSTID' => $newsID);
     $table = "comments";
     $innerJoin = "INNER JOIN\n (SELECT `groups`.`Gname` Gname ,\n  `members`.`id`,`members`.`name` name,`members`.`ProfilePic` ProfilePic\n  FROM groups INNER JOIN members ON members.groupID=groups.Gid)\n  `members` ON `members`.`id`=`NewsComments`.`memberID`";
     $getArray = $_GET;
     require "functions/generalFunctions.php";
     $start = getStartPage($getArray, $per_page);
     $db->select('NewsComments', $where, $limit = $start . "," . $per_page, $order = false, $where_mode = "AND", $print_query = false, $what, $innerJoin);
     $input = $db->result_array();
     include "views/list.php";
 }
Beispiel #4
0
 public function ViewNewsList()
 {
     $Page_Title = "عرض حميع الاخبار المنشوره";
     $where = array('1' => 1);
     $myFunctions = new TableView();
     $myFunctions->addF("عرض", "View", "v");
     $myFunctions->addF("تعديل", "Edit", "e");
     global $db;
     $myTable = new TableView();
     $myTable->addE("ID", "NewsID", "`NewsID`");
     $myTable->addE("عنوان الخبر", "Subject", "`Subject`");
     $myTable->addE("تفاصيل الخبر", "Description", "`Description`");
     $myTable->addElement("صوره الخبر", "Image", "`Image`", "<img class=\"img-responsive thumbnail\" src='../image.php?id=", "&t=150x150' />");
     $keyid = "NewsID";
     global $per_page;
     $what = $myTable->returnArray();
     $table = "News";
     $innerJoin = "";
     $getArray = $_GET;
     require "functions/generalFunctions.php";
     $start = getStartPage($getArray, $per_page);
     $db->select($table, $where, $limit = $start . "," . $per_page, $order = false, $where_mode = "AND", $print_query = false, $what, $innerJoin);
     $input = $db->result_array();
     include "views/list.php";
 }
Beispiel #5
0
 public function viewGroupList()
 {
     $Page_Title = "القبائل";
     global $db;
     require_once "views/tablelist.php";
     $myTable = new TableView();
     $myTable->addE("id", "Gid", "`Gid`");
     $myTable->addE("اسم القبيله", "Gname", "`Gname`");
     $myTable->addElement("صوره القبيله", "GProfilePic", "`GProfilePic`", "<img class=\"img-responsive thumbnail\" src='../image.php?id=", "&t=150x150' />");
     $keyid = "Gid";
     global $per_page;
     $myFunctions = new TableView();
     $myFunctions->addF("عرض", "View", "v");
     $myFunctions->addF("تعديل", "Edit", "e");
     $what = $myTable->returnArray();
     $table = "groups";
     $innerJoin = "";
     $getArray = $_GET;
     require "functions/generalFunctions.php";
     $start = getStartPage($getArray, $per_page);
     $db->select($table, "", $limit = $start . "," . $per_page, $order = false, $where_mode = "AND", $print_query = false, $What = "*", $innerJoin);
     $input = $db->result_array();
     include "views/list.php";
 }
Beispiel #6
0
 public function response()
 {
     $user_order = @$_GET['order'];
     $user_direction = @$_GET['direction'];
     $user_limit = @$_GET['limit'];
     $user_start = @$_GET['start'];
     $direction = $user_direction == 'desc' ? 'desc' : 'asc';
     $order = reset($this->table->columns)->name;
     foreach ($this->table->columns as $column) {
         if ($column->name == $user_order) {
             $order = $column->name;
         }
     }
     $limit = min(max(intval($user_limit), 20), 500);
     $start = max(intval($user_start), 0);
     return parent::response(['rows' => $this->da->select($this->table, "1 ORDER BY {$order} {$direction} LIMIT {$start}, {$limit}"), 'order' => $order, 'direction' => $direction, 'limit' => $limit, 'start' => $start]);
 }
Beispiel #7
0
 public function response()
 {
     $template_params['links'] = [];
     foreach ($this->table->links as $link) {
         if ($link instanceof \Carbo\Extensions\Admin\LinkInformation) {
             $template_params['links'][] = ['all' => $this->da->select($link->remoteTable), 'info' => $link];
         } elseif ($link instanceof \Carbo\Extensions\Admin\OneToManyLinkInformation) {
             $template_params['links'][] = ['all' => $this->da->select($link->remoteTable), 'info' => $link];
         }
     }
     foreach ($this->table->columns as $column) {
         if ($column->isForeign) {
             $foreign_table = $this->da->schema->tables[$column->foreignTable];
             $template_params['row'][$column->name] = ['all' => $this->da->select($foreign_table), 'info' => new \Carbo\Extensions\Admin\OneToManyLinkInformation($foreign_table, $this->table, $column)];
         }
     }
     return parent::response($template_params);
 }
Beispiel #8
0
 public function response($template_params = [])
 {
     $template_params['row'] = $this->da->selectOne($this->table, "{$this->key} = ?", [$this->value]);
     if (!$template_params['row']) {
         throw new \Carbo\Http\CodeException(\Carbo\Http\Code::NotFound);
     }
     $template_params['links'] = [];
     foreach ($this->table->links as $link) {
         if ($link instanceof \Carbo\Extensions\Admin\LinkInformation) {
             $template_params['links'][] = ['all' => $this->da->select($link->remoteTable), 'selected' => $this->da->getLinks($link, $this->value), 'info' => $link];
         } elseif ($link instanceof \Carbo\Extensions\Admin\OneToManyLinkInformation) {
             $template_params['links'][] = ['all' => $this->da->select($link->remoteTable), 'selected' => $this->da->select($link->remoteTable, "{$link->remoteColumn->name} = ?", [$this->value], true), 'info' => $link];
         }
     }
     foreach ($this->table->columns as $column) {
         if ($column->isForeign) {
             $foreign_table = $this->da->schema->tables[$column->foreignTable];
             $template_params['row'][$column->name] = ['all' => $this->da->select($foreign_table), 'selected' => [$template_params['row'][$column->name]], 'info' => new \Carbo\Extensions\Admin\OneToManyLinkInformation($foreign_table, $this->table, $column)];
         }
     }
     return parent::response($template_params);
 }
    switch ($page_action) {
        case 'update_by_id':
            $db_update_success = PasswordManager::updateRecord($PASSMAN_ID, $USER_ID, $site, $url, $username, $password);
            break;
        case 'add_password':
            $db_add_success = PasswordManager::addRecord($USER_ID, $site, $url, $username, $password);
            break;
        case 'delete_by_id':
            $db_delete_success = PasswordManager::deleteRecord($PASSMAN_ID, $USER_ID);
            break;
    }
    $passman_records = PasswordManager::getAllRecords($USER_ID);
    $page_title = 'PassMan';
    $alt_menu = getAddButton();
    // build add view
    $addView = new AddView('Add', 'add_password');
    $addView->addRow('site', 'Site');
    $addView->addRow('url', 'URL');
    $addView->addRow('username', 'Username');
    $addView->addRow('password', 'Password');
    // build table view
    $tableView = new TableView(array('Site', 'Username', 'Password', ''));
    foreach ($passman_records as $record) {
        $tableView->addRow(array(TableView::createCell('site', '<a href="' . $record->getUrl() . '" target="_blank">' . $record->getSite() . '</a>'), TableView::createCell('username', $record->getUsername()), TableView::createCell('password', '<span class="mask">************</span><span class="password-actual">' . $record->getPassword() . '</span>'), TableView::createEdit($record->getPassmanId())));
    }
    // load views to be used in front end
    $views_to_load = array();
    $views_to_load[] = '../../views/_add.php';
    $views_to_load[] = '../../views/_table.php';
    include '../../views/_generic.php';
}
 public function createEdit($id)
 {
     return TableView::createCell('edit', '<a class="edit" href="edit.php?id=' . $id . '">Edit</a>');
 }
Beispiel #11
0
 public function getEventsbyGroup($GroupID)
 {
     global $db;
     $db->select('groups', array('Gid' => $GroupID), $limit = false, $order = false, $where_mode = "AND", $print_query = false, $What = "*", $innerJoin = "");
     $Group = $db->row_array();
     $Page_Title = "مناسبات قبيله  " . $Group['Gname'];
     $where = array('members`.`groupID' => $GroupID);
     $myFunctions = new TableView();
     $myFunctions->addF("عرض", "ViewEvent", "v");
     $myFunctions->addF("تعديل", "Edit", "e");
     events::ViewList($where, $Page_Title, $myFunctions);
 }
    $id = request_isset('id');
    $key = request_isset('key');
    $value = request_isset('value');
    $settingsManager = new SettingsManager();
    switch ($page_action) {
        case 'add_setting':
            $settingsManager->addRecord($key, $value);
            break;
        case 'delete_by_id':
            $settingsManager->deleteRecord($id);
            break;
        case 'update_by_id':
            $settingsManager->updateRecord($id, $key, $value);
            break;
    }
    $settings_data = $settingsManager->getAllRecords();
    $page_title = 'Settings';
    $alt_menu = '<a href="#" class="add">Add</a>';
    $addView = new AddView('Add', 'add_setting');
    $addView->addRow('key', 'Key');
    $addView->addRow('value', 'Value');
    $tableView = new TableView(array('Key', 'Value', ''));
    while (($settings_row = mysql_fetch_array($settings_data)) != null) {
        $tableView->addRow(array(TableView::createCell('key', $settings_row['key']), TableView::createCell('value', $settings_row['value']), TableView::createEdit($settings_row['SETTING_ID'])));
    }
    $views_to_load = array();
    $views_to_load[] = '../../views/_add.php';
    $views_to_load[] = '_warning.php';
    $views_to_load[] = '../../views/_table.php';
    include '../../views/_generic.php';
}
 public function __construct($id)
 {
     parent::__construct($id);
     $lang =& DoceboLanguage::CreateInstance('course', 'lms');
     if (Docebo::user()->getUserLevelId() == ADMIN_GROUP_PUBLICADMIN) {
         $this->serverUrl = Get::rel_path('lms') . '/ajax.server.php?plf=lms&file=coursetableview&sf=table_view';
         $this->addFormatter("man_subscr", 'courseFormatters.p_man_subscr');
     } else {
         $this->serverUrl = Get::rel_path('lms') . '/ajax.adm_server.php?plf=lms&file=coursetableview&sf=table_view';
         $this->addFormatter("man_subscr", 'courseFormatters.man_subscr');
     }
     $this->addFormatter("classroom", 'courseFormatters.classroom');
     $this->addFormatter("certificate", 'courseFormatters.certificate');
     $this->addFormatter("competence", 'courseFormatters.competence');
     $this->addFormatter("menu", 'courseFormatters.menu');
     $this->addFormatter("mod", 'courseFormatters.mod');
     $array_columns = array();
     if (checkPerm('mod', true, 'course', 'lms') || checkPerm('mod', true, 'public_course_admin', 'lms')) {
         $array_columns[] = array("key" => "code", "label" => $lang->def("_CODE"), "sortable" => true, "className" => 'min-cell', 'editor' => 'new YAHOO.widget.TextboxCellEditor({asyncSubmitter: saveData})');
         $array_columns[] = array("key" => "name", "label" => $lang->def("_COURSE_NAME"), "sortable" => true, 'editor' => 'new YAHOO.widget.TextboxCellEditor({asyncSubmitter: saveData})');
     } else {
         $array_columns[] = array("key" => "code", "label" => $lang->def("_CODE"), "sortable" => true, "className" => 'min-cell');
         $array_columns[] = array("key" => "name", "label" => $lang->def("_COURSE_NAME"), "sortable" => true);
     }
     //if(checkPerm('moderate', true, 'course', 'lms') || checkPerm('moderate', true, 'public_course_admin', 'lms'))
     $array_columns[] = array("key" => "waiting", "label" => $lang->def("_WAITING_USERS"), "className" => 'img-cell');
     if (checkPerm('subscribe', true, 'course', 'lms') || checkPerm('subscribe', true, 'public_course_admin', 'lms')) {
         $array_columns[] = array("key" => "subscriptions", "label" => Get::img('course/subscribe.png', $lang->def('_SUBSCRIBE')), "sortable" => true, "className" => 'img-cell', "formatter" => $this->getCellFormatter("man_subscr"));
     }
     if (checkPerm('mod', true, 'course', 'lms') || checkPerm('mod', true, 'public_course_admin', 'lms')) {
         $array_columns[] = array("key" => "classroom", "label" => Get::img('course/classroom-cal.png', $lang->def('_CLASSROOM')), "className" => 'img-cell');
         $array_columns[] = array("key" => "certificate", "label" => Get::img('course/certificate.png', Lang::t('_CERTIFICATE', 'certificate', 'lms')), "className" => 'img-cell', "formatter" => $this->getCellFormatter("certificate"));
         $array_columns[] = array("key" => "competence", "label" => Get::img('course/competences.png', Lang::t('_COMPETENCES', 'competences', 'lms')), "className" => 'img-cell', "formatter" => $this->getCellFormatter("competence"));
         $array_columns[] = array("key" => "menu", "label" => Get::img('course/menu.png', $lang->def('_ASSIGN_MENU')), "className" => 'img-cell', "formatter" => $this->getCellFormatter("menu"));
     }
     if (checkPerm('add', true, 'course', 'lms') || checkPerm('add', true, 'public_course_admin', 'lms')) {
         $array_columns[] = array("key" => "dup", "label" => Get::img('standard/dup.png', $lang->def('_MAKE_A_COPY')), "className" => 'img-cell');
     }
     if (checkPerm('mod', true, 'course', 'lms') || checkPerm('mod', true, 'public_course_admin', 'lms')) {
         $array_columns[] = array("key" => "mod", "label" => Get::img('standard/edit.png', $lang->def('_MOD')), "className" => 'img-cell', "formatter" => $this->getCellFormatter("mod"));
     }
     if (checkPerm('del', true, 'course', 'lms') || checkPerm('del', true, 'public_course_admin', 'lms')) {
         $array_columns[] = array("key" => "del", "label" => Get::img('standard/delete.png', $lang->def('_DEL')), "className" => 'img-cell', "formatter" => $this->getCellFormatter('delete'));
     }
     $this->columns = $array_columns;
     $this->fields = array("idCourse", "code", "name", "status", "waiting", "subscriptions", "classroom", "certificate", "competence", "menu", "dup", "mod", "del");
     $this->addOption('langs', array('_START' => $lang->def('_START'), '_PREV' => $lang->def('_PREV'), '_NEXT' => $lang->def('_NEXT'), '_END' => $lang->def('_END'), '_OF' => $lang->def('_OF'), 'MSG_EMPTY' => $lang->def('_EMPTY'), 'MSG_ERROR' => $lang->def('_SERVER_CONNECTION_ERROR'), 'MSG_LOADING' => $lang->def('_LOADING'), '_YES' => $lang->def('_CONFIRM'), '_NO' => $lang->def('_UNDO'), '_AREYOUSURE' => $lang->def('_AREYOUSURE'), '_DEL' => $lang->def('_DEL'), '_SERVER_CONNECTION_ERROR' => $lang->def('_SERVER_CONNECTION_ERROR')));
     if (!isset($_SESSION['course_category']['filter_status'])) {
         $_SESSION['course_category']['filter_status'] = array('c_category' => 0, 'c_filter' => '', 'c_flatview' => true, 'c_waiting' => false);
     } else {
         $filter =& $_SESSION['course_category']['filter_status'];
         if (!isset($filter['c_category'])) {
             $_SESSION['course_category']['filter_status']['c_category'] = 0;
         }
         if (!isset($filter['c_filter'])) {
             $_SESSION['course_category']['filter_status']['c_filter'] = '';
         }
         if (!isset($filter['c_flatview'])) {
             $_SESSION['course_category']['filter_status']['c_flatview'] = true;
         }
         if (!isset($filter['c_waiting'])) {
             $_SESSION['course_category']['filter_status']['c_waiting'] = '';
         }
     }
     $filter =& $_SESSION['course_category']['filter_status'];
     $this->addOption('baseUrl', 'index.php');
     $this->addOption('imageUrl', Get::tmpl_path('base') . 'images/');
     $this->addOption('initialFilter', array('c_category' => array('operator' => '', 'value' => $filter['c_category']), 'c_filter' => array('operator' => '', 'value' => $filter['c_filter']), 'c_flatview' => array('operator' => '', 'value' => $filter['c_flatview']), 'c_waiting' => array('operator' => '', 'value' => $filter['c_waiting'])));
     $this->addOption('deleteDialog', array('id' => 'idCourse', 'name' => 'name'));
 }
    $passphrase = request_isset('passphrase');
    switch ($page_action) {
        case 'update_by_id':
            $db_update_success = KeyManager::updateRecord($KEYSTORE_ID, $USER_ID, $name, $private_key, $public_key, $passphrase);
            break;
        case 'add_key':
            $db_add_success = KeyManager::addRecord($KEYSTORE_ID, $USER_ID, $name, $private_key, $public_key, $passphrase);
            break;
        case 'delete_by_id':
            $db_delete_success = KeyManager::deleteRecord($KEYSTORE_ID, $USER_ID);
            break;
    }
    $keyman_records = KeyManager::getAllRecords($USER_ID);
    $alt_menu = getAddButton();
    // build add view
    $addView = new AddView('Add', 'add_key');
    $addView->addRow('name', 'Name');
    $addView->addRow('private_key', 'Private key');
    $addView->addRow('public_key', 'Public key');
    $addView->addRow('passphrase', 'Passphrase');
    // build table view
    $tableView = new TableView(array('Name', 'Public key', 'Private key', 'Passphrase', ''));
    foreach ($keyman_records as $record) {
        $tableView->addRow(array(TableView::createCell('name', $record->getName()), TableView::createCell('public_key', $record->getPublicKey()), TableView::createCell('private_key', $record->getPrivateKey()), TableView::createCell('passphrase', '<span class="mask">************</span><span class="password-actual">' . $record->getPassphrase() . '</span>'), TableView::createEdit($record->getKeystoreId())));
    }
    // load views to be used in front end
    $views_to_load = array();
    $views_to_load[] = '../../views/_add.php';
    $views_to_load[] = '../../views/_table.php';
    include '../../views/_generic.php';
}
Beispiel #15
0
 public function viewMemberByGroup($groupID)
 {
     global $db;
     $db->select('groups', array('Gid' => $groupID), $limit = false, $order = false, $where_mode = "AND", $print_query = false, $What = "*", $innerJoin = "");
     $Group = $db->row_array();
     $Page_Title = "اعضاء قبيله " . $Group['Gname'];
     $where = array('groupID' => $groupID);
     $myFunctions = new TableView();
     $myFunctions->addF("عرض", "View", "v");
     $myFunctions->addF("تعديل", "Edit", "e");
     members::getMembersList($where, $Page_Title, $myFunctions);
 }
    $authManager = new AuthManager();
    switch ($page_action) {
        case 'update_by_id':
            //$db_update_success = $userManager->updateRecord ($id, $user_type, $username, $password);
            $db_update_success = $authManager->updateRecord($id, $user_type, $username, $new_password);
            break;
        case "add_user":
            //$userManager->addRecord($user_type, $username, $password);
            $db_add_success = $authManager->addUser($user_type, $username, $password);
            break;
        case "delete_by_id":
            //$userManager->deleteRecord ($id);
            $db_delete_success = $authManager->deleteUser($id);
            break;
    }
    $users_data = $userManager->getAllRecords();
    $page_title = 'Manage users';
    $alt_menu = '<a href="#" class="add">Add</a>';
    $addView = new AddView('Add', 'add_user');
    $addView->addOptionBox('user_type', 'User type', $usertype_options);
    $addView->addRow('username', 'Username', null, 'eg. Neil');
    $addView->addRow('password', 'Password', null, 'eg. Sm4rtH0uSe');
    $tableView = new TableView(array('View', ''));
    while (($users_row = mysql_fetch_array($users_data)) != null) {
        $tableView->addRow(array(TableView::createCell('user_type', $users_row['user_type']), TableView::createCell('username', $users_row['username']), TableView::createEdit($users_row['USER_ID'])));
    }
    $views_to_load = array();
    $views_to_load[] = '../../views/_add.php';
    $views_to_load[] = '../../views/_table.php';
    include '../../views/_generic.php';
}
Beispiel #17
0
 // build header view
 $headerView = new HeaderView(($sessionManager->getUserType() == 'ADMIN' ? 'Indexer | ' : '') . 'Stocks');
 $headerView->setLink('<link rel="stylesheet" type="text/css" href="css/styles.css" />');
 if ($sessionManager->getUserType() == 'ADMIN') {
     $headerView->setMeta('<meta http-equiv="refresh" content="1800;url=#" />');
 } else {
     $headerView->setAltMenu('<a class="add" href="#">Add</a>');
     // build add view
     $addView = new AddView('Add', 'add_stock');
     $addView->addRow('ticker', 'Ticker');
 }
 // build table view
 if ($sessionManager->getUserType() == 'ADMIN') {
     $tableView = new TableView(array('Stock', 'Price', 'Change'));
 } else {
     $tableView = new TableView(array('Stock', 'Price', 'Change', ''));
 }
 foreach ($stock_records as $record) {
     if ($sessionManager->getUserType() == 'ADMIN') {
         $tableView->addRow(array(TableView::createCell('stock', $record->getStock()), TableView::createCell('price', $record->getPrice(true)), TableView::createCell('change', $record->getChangePoints(true) . ' (' . $record->getChangePercent(true) . ')')));
         StockManager::updateHistory($record->getStock(), $record->getTicker(), $record->getPrice(), $record->getChangePoints(), $record->getChangePercent(), $record->getUpdateTime());
     } else {
         $tableView->addRow(array(TableView::createCell('stock', $record->getStock()), TableView::createCell('price', $record->getPrice(true)), TableView::createCell('change ' . ($record->getChangePoints() < 0 ? 'negitive' : 'positive'), $record->getChangePoints(true) . ' (' . $record->getChangePercent(true) . ')'), TableView::createEdit($record->getTicker())));
     }
     $updated = $record->getUpdateTime();
 }
 $views_to_load = array();
 $views_to_load[] = '../../views/_add.php';
 $views_to_load[] = '../../views/_table.php';
 $views_to_load[] = '_update.php';
 include '../../views/_generic.php';