- has("mobile_codes", ["AND" => ["uid" => $_SESSION['uid'], "codeid" => $_GET['showsynccode']]])) {
- $code = $database->get("mobile_codes", 'code', ["AND" => ["uid" => $_SESSION['uid'], "codeid" => $_GET['showsynccode']]]);
- } else {
- $code = strtoupper(substr(md5(mt_rand() . uniqid("", true)), 0, 20));
- $desc = htmlspecialchars($_POST['desc']);
- $database->insert('mobile_codes', ['uid' => $_SESSION['uid'], 'code' => $code, 'description' => $desc]);
- }
- if (strpos(URL, "http") !== FALSE) {
- $url = URL . "mobile/index.php";
- } else {
- $url = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] . (($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) ? ":" . $_SERVER['SERVER_PORT'] : "") . URL . "mobile/index.php";
- }
- $encodedurl = str_replace("/", "\\", $url);
- $codeuri = "bizsync://" . $encodedurl . "/" . $_SESSION['username'] . "/" . $code;
- $qrCode = new QrCode($codeuri);
- $qrCode->setWriterByName('svg');
- $qrCode->setSize(550);
- $qrCode->setErrorCorrectionLevel(ErrorCorrectionLevel::HIGH);
- $qrcode = $qrCode->writeDataUri();
- $chunk_code = trim(chunk_split($code, 5, ' '));
- $lang_done = $Strings->get("done adding sync code", false);
- ?>
-
+
+ has("mobile_codes", ["AND" => ["uid" => $_SESSION['uid'], "codeid" => $_GET['showsynccode']]])) {
+ $code = $database->get("mobile_codes", 'code', ["AND" => ["uid" => $_SESSION['uid'], "codeid" => $_GET['showsynccode']]]);
+ } else {
+ $code = strtoupper(substr(md5(mt_rand() . uniqid("", true)), 0, 20));
+ $desc = htmlspecialchars($_POST['desc']);
+ $database->insert('mobile_codes', ['uid' => $_SESSION['uid'], 'code' => $code, 'description' => $desc]);
+ }
+ if (strpos(URL, "http") !== FALSE) {
+ $url = URL . "mobile/index.php";
+ } else {
+ $url = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] . (($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) ? ":" . $_SERVER['SERVER_PORT'] : "") . URL . "mobile/index.php";
+ }
+ $encodedurl = str_replace("/", "\\", $url);
+ $codeuri = "bizsync://" . $encodedurl . "/" . $_SESSION['username'] . "/" . $code;
+ $qrCode = new QrCode($codeuri);
+ $qrCode->setWriterByName('svg');
+ $qrCode->setSize(550);
+ $qrCode->setErrorCorrectionLevel(ErrorCorrectionLevel::HIGH);
+ $qrcode = $qrCode->writeDataUri();
+ $chunk_code = trim(chunk_split($code, 5, ' '));
+ $lang_done = $Strings->get("done adding sync code", false);
+ ?>
get("scan sync qrcode"); ?>
@@ -72,57 +71,57 @@ if (!empty($_GET['delsynccode'])) {
} else {
$activecodes = $database->select("mobile_codes", ["codeid", "code", "description"], ["uid" => $_SESSION['uid']]);
?>
-
-
- get("sync explained"); ?>
-
-
+
+ get("sync explained"); ?>
+
+
+
+
+ get("active sync codes"); ?>
-
-
- get("active sync codes"); ?>
-
- 0) {
- foreach ($activecodes as $c) {
- ?>
-
-
-
-
-
-
-
-
+ 0) {
+ foreach ($activecodes as $c) {
+ ?>
+
+
+
+
-
-
-
- get("no active codes"); ?>
+
-
+
+ get("no active codes"); ?>
+
+
+
+
\ No newline at end of file