Exemplo n.º 1
0
 public static function deleteValue($SDBFile, $id, $symbol = ";")
 {
     $value = getValue(readSDB($SDBFile), $id);
     $searchLine = $id . $symbol . $value . "\n  ";
     $file = "sdbs/" . $SDBFile;
     $lines = file($file);
     $count = 0;
     foreach ($lines as $line) {
         if ($line == $searchLine) {
             $count++;
         } else {
             $result .= $line;
         }
     }
     file_put_contents($file, $result);
     if ($count == 0) {
         return false;
     } else {
         return true;
     }
 }
Exemplo n.º 2
0
    ?>

Hello <?php 
    echo $api->getSynchroUsername();
    ?>
! You mail is: <?php 
    echo $api->getMail();
    ?>
<br>
This plugin is just a test. 'Real' plugins will come in the future!<br>
Pluginname: <?php 
    echo getValue(readSDB("examplePlugin.sdb"), "NAME");
    ?>
<br>
Pluginversion: <?php 
    echo getValue(readSDB("examplePlugin.sdb"), "VERSION");
    ?>
<br>
<a href="<?php 
    echo multiSite_Link("test");
    ?>
">MultiSite example</a><br>
<?php 
    echo basename($_SERVER["SCRIPT_FILENAME"]);
    tiles_createTile("Test tile", "This is an example of the 'tiles' package", multiSite_Link("test"), "pencil");
    ?>

<?php 
}
if (multiSite_Site("test")) {
    ?>
Exemplo n.º 3
0
    //optional
}
if (isset($_POST["clearlist"])) {
    $file = fopen("sdbs/allm.logins.sdb", "w");
    fwrite($file, "");
    fclose($file);
    $file = fopen("sdbs/allm.loginTimes.sdb", "w");
    fwrite($file, "");
    fclose($file);
    include "scripts/detectDevice.php";
    $file = fopen("sdbs/allm.loggedInDevices.sdb", "w");
    fwrite($file, "");
    fclose($file);
    header("Location: index.php");
}
$loggedInUsers = readSDB("allm.logins.sdb");
$loginTimes = readSDB2("allm.loginTimes.sdb");
$loggedInDevices = readSDB2("allm.loggedInDevices.sdb");
$sessionid = hash("md5", session_id());
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Creative - Bootstrap 3 Responsive Admin Template">
    <meta name="author" content="GeeksLabs">
    <meta name="keyword" content="Creative, Dashboard, Admin, Template, Theme, Bootstrap, Responsive, Retina, Minimal">
    <link rel="shortcut icon" href="img/favicon.png">

    <title>Synchro</title>
Exemplo n.º 4
0
<?php

if (!SDB_exists("fileDownloader.downloadList.sdb")) {
    createSDB("fileDownloader.downloadList.sdb");
}
$downloadList = readSDB("fileDownloader.downloadList.sdb");
?>
Welcome to File Downloader. This plugin allows you to download files from other websites directly to your Synchro.<br>
Please notice that this plugin is still in an early beta state.<br><br>
<a href="<?php 
echo multiSite2_Link("addFile");
?>
" class="btn btn-lg btn-raised btn-block btn-primary">Add file to the Downloadlist</a><br>
<table class="table table-striped">
  <tr>
    <th>
      Your Downloadlist:
    </th>
  </tr>
  <?php 
foreach ($downloadList as $downloadItem) {
    ?>
  <tr>
    <td>
      <?php 
    echo $downloadItem;
    ?>
    </td>
  </tr>
  <?php 
}