ProShell v2.0
Dashboard
Server Info
Server: 158.106.128.192
PHP: 8.2.33
home
planet5
public_html
bansibaba.com
2026-09-12 14:18:51
Editing: State.php
Cancel
Save Changes
<?php /** * Class represents records from table states * {autogenerated} * @property int $state_id * @property string $state * @property string $country * @property string $title * @property string $status enum('added','changed') * @property int $tag * @see Am_Table */ class State extends Am_Record { } class StateTable extends Am_Table { protected $_key = 'state_id'; protected $_table = '?_state'; protected $_recordClass = 'State'; function getTitleByCode($country, $code){ return $this->_db->selectCell("SELECT title FROM ?_state WHERE country=? AND state=?", $country, $code); } function getOptions($country, $add_empty=false){ $tag = defined('AM_ADMIN') ? '' : 'AND tag>=0'; $res = $this->_db->selectCol("SELECT state as ARRAY_KEY, CASE WHEN tag<0 THEN CONCAT(title, ' (disabled)') ELSE title END FROM ?_state WHERE country=? $tag ORDER BY tag DESC, title",$country); if ($res && $add_empty) $res = array_merge(array('' => ___('[Select state]')),$res); return $res; } }
Upload Files
Cancel
Upload
Create New
Cancel
Create
Change Permissions
Cancel
Save
Change Date
Cancel
Save
Rename Item
Cancel
Save
Confirm Delete
Are you sure you want to delete the selected items?
Cancel
Delete