static function edittable($saveid = -1, $pid = -1) { //таблица редактирования для вывода в админке $wt = new wra_admintable(); $wt->link = WRA::getcurpage(); $wt->query = 'SELECT fb0.id,fb0.userid, fb0.userid, fb0.twuserid, fb0.display_name, fb0.regdate, fb0.username, fb0.usersurname, fb0.link, fb0.gender, fb0.photo, fb0.points, fb0.access_token, fb0.email, fb0.phone, fb0.adres FROM `' . WRA_CONF::$db_prefix . "twu` as fb0\n WHERE fb0.id='{$saveid}'"; $c0 = new wra_column('id', column_type_id, 'id'); $c0->defaultvalue = $saveid; $wt->addcolumn($c0); $c0 = new wra_column('Обнулить литры', column_type_customfield, 'litres'); $c0->customfieldpage = 'parts/litres.php'; $wt->addcolumn($c0); $c0 = new wra_column('Id пользователя', column_type_text, 'userid'); $wt->addcolumn($c0); $c0 = new wra_column('Id пользователя на Одноклассниках', column_type_text, 'twuserid'); $wt->addcolumn($c0); $c0 = new wra_column('Отображаемое имя', column_type_text, 'display_name'); $wt->addcolumn($c0); $c0 = new wra_column('Дата регистрации', column_type_text, 'regdate'); $wt->addcolumn($c0); $c0 = new wra_column('Имя', column_type_text, 'username'); $wt->addcolumn($c0); $c0 = new wra_column('Фамилия', column_type_text, 'usersurname'); $wt->addcolumn($c0); $c0 = new wra_column('Ссылка на профиль', column_type_text, 'link'); $wt->addcolumn($c0); $c0 = new wra_column('Пол', column_type_text, 'gender'); $wt->addcolumn($c0); $c0 = new wra_column('Фотография', column_type_text, 'photo'); $wt->addcolumn($c0); $c0 = new wra_column('Литры', column_type_text, 'points'); $wt->addcolumn($c0); $c0 = new wra_column('Access Token', column_type_text, 'access_token'); $wt->addcolumn($c0); $c0 = new wra_column('Email ', column_type_text, 'email'); $wt->addcolumn($c0); $c0 = new wra_column('Телефон', column_type_text, 'phone'); $wt->addcolumn($c0); $c0 = new wra_column('Адрес', column_type_text, 'adres'); $wt->addcolumn($c0); if ($saveid != -1) { $wt->load($saveid, $pid); } else { $wt->addnew($saveid, $pid); } return $wt; }
static function edittable($saveid = -1, $pid = -1) { $wt = new wra_admintable(); $wt->link = WRA::getcurpage(); $wt->query = "SELECT \n\t\t\t\t`id`,\n\t\t\t\t`table`,\n\t\t\t\t`field`,\n\t\t\t\t`lang`,\n\t\t\t\t`value`,`rowid`\n\t\t\t\tFROM `" . WRA_CONF::$db_prefix . "langed` WHERE `id`='{$saveid}'"; //columns $c0 = new wra_column("id", column_type_id, 'id'); $c0->defaultvalue = $saveid; $c0->headerstyle = "font-weight:bold;width:100px;"; $wt->addcolumn($c0); $c0 = new wra_column("table", column_type_text, 'table'); $c0->itemstyle = "width:250px;padding:3px;height:50px;"; $wt->addcolumn($c0); $c0 = new wra_column("field", column_type_text, 'field'); $c0->itemstyle = "width:250px;padding:3px;height:50px;"; $wt->addcolumn($c0); $c0 = new wra_column("lang", column_type_text, 'lang'); $c0->itemstyle = "width:250px;padding:3px;height:50px;"; $wt->addcolumn($c0); $c0 = new wra_column("value", column_type_text, 'value'); $c0->itemstyle = "width:250px;padding:3px;height:50px;"; $c0->uselanguages = true; $wt->addcolumn($c0); $c0 = new wra_column("rowid", column_type_text, 'rowid'); $c0->itemstyle = "width:250px;padding:3px;height:50px;"; $wt->addcolumn($c0); $c0 = new wra_column("Ключ перевода", column_type_text, 'key'); $c0->itemstyle = "width:250px;padding:3px;height:50px;"; $wt->addcolumn($c0); if ($saveid != -1) { $wt->load($saveid, $pid); } else { $wt->addnew($saveid, $pid); } return $wt; }