Commit | Line | Data |
---|---|---|
2aa91ff2 S |
1 | <?php |
2 | namespace dns\page; | |
3 | use dns\system\DNS; | |
4 | use dns\system\User; | |
5 | ||
6 | /** | |
7 | * @author Jan Altensen (Stricted) | |
8 | * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> | |
9 | * @copyright 2014-2015 Jan Altensen (Stricted) | |
10 | */ | |
11 | class ApiManagementPage extends AbstractPage { | |
12 | public $activeMenuItem = 'api'; | |
13 | ||
14 | public function prepare() { | |
15 | $sql = "SELECT * FROM dns_api WHERE userID = ?"; | |
16 | $res = DNS::getDB()->query($sql, array($_SESSION['userID'])); | |
17 | $row = DNS::getDB()->fetch_array($res); | |
18 | ||
19 | $apiKey = ""; | |
20 | ||
21 | if (isset($row['apiKey'])) { | |
22 | $apiKey = $row['apiKey']; | |
23 | } | |
24 | ||
25 | DNS::getTPL()->assign(array("apiKey" => $apiKey)); | |
26 | } | |
27 | } |