exec('CREATE TABLE IF NOT EXISTS boxbrstore(id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(100), imageurl VARCHAR(100), url VARCHAR(100), linktype VARCHAR(100), description VARCHAR(100),createdon VARCHAR(100))'); $rows = $dbboxbra->query('SELECT COUNT(*) as count FROM boxbrstore'); $row = $rows->fetchArray(); $numRows = $row['count']; $HOSTa = $lurl = (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] !== 'off') ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/img/boxbr_demo.png'; $date = date('Y-m-d H:i:s'); /* if ($numRows == 0) { $dbboxbra->exec('INSERT INTO boxbrstore(title,imageurl, url, linktype, description, createdon) VALUES(\'Sample\',\'' . $HOSTa. '\',\'http://apkboxbr.k6.com.br\',\'0\',\'BoxBR Apks Rebrand\',\'' . $date . '\')'); } */ if(isset($_GET['delete'])){ $resd = $dbboxbra->query('SELECT * FROM boxbrstore WHERE id=' . $_GET['delete']); $rowd = $resd->fetchArray(); $url= $rowd['imageurl']; $file_to_delete = basename(parse_url($url, PHP_URL_PATH)); $file_to_delete = 'apksimage/' . $file_to_delete; //echo $file_to_delete; if (file_exists($file_to_delete)) { unlink($file_to_delete); } $dbboxbra->exec('DELETE FROM boxbrstore WHERE id=' . $_GET['delete']); header("Location: store.php"); } include 'includes/header.php'; echo ' ' . "\n"; echo '
' . "\n"; if (isset($_GET['message'])) { echo '

'.$_GET['message'].'

'; } if (isset($_GET['messageA'])) { echo '

'.$_GET['messageA'].'

'; } if (isset($_GET['messageE'])) { echo '

'.$_GET['messageE'].'

'; } if (isset($_GET['messageS'])) { echo '

'.$_GET['messageS'].'

'; } echo ' ' . "\n"; echo '
' . "\n"; echo "\n"; echo ' ' . "\n"; echo '
' . "\n"; echo "\n"; echo ' ' . "\n"; echo '
' . "\n"; //echo '
echo '

   Gerenciador de Loja

' . "\n"; echo '
Add App' . "\n"; echo ' ' . "\n"; echo '
' . "\n"; echo '
' . "\n"; $dbboxbra = new SQLite3('./api/.boxbr_store.db'); $res = $dbboxbra->query('SELECT * FROM boxbrstore'); while ($row = $res->fetchArray()) { if($row['linktype'] == '0'){ $rtype = 'Local File'; }else{ $rtype = 'Link URL'; } echo ' ' . "\n"; } $dbboxbra->close(); echo '
APK Imagem APK Titulo APK Link Data Add Editar Deletar
'.$row['title'].' Mouse over to show '.$row['createdon'].'
' . "\n"; echo "\t\t" . '
' . "\n"; echo '' . "\n"; echo "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo '
' . "\n"; ?> function myFunction(DIV) { var x = document.getElementById(DIV); var y = document.getElementById(DIV+"show"); if (x.style.display === "none") { x.style.display = "block"; y.className = "fa fa-minus"; } else if (x.style.display === "block") { x.style.display = "none"; y.className = "fa fa-plus"; }else { x.style.display = "none"; y.className = "fa fa-plus"; } } '."\n"; echo ' ' . "\n"; echo ' ' . "\n"; ############# end ############## include 'includes/footer.php'; require ('includes/boxbr.php'); print "\n"; ?>