123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695 |
- <?php
- /**
- * Copyright 2021, 2024 5 Mode
- *
- * This file is part of Homomm.
- *
- * Homomm is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Homomm is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Homomm. If not, see <https://www.gnu.org/licenses/>.
- *
- * home.php
- *
- * Homomm home page.
- *
- * @author Daniele Bonini <my25mb@aol.com>
- * @copyrights (c) 2021, 2024, 5 Mode
- */
-
- $msgHistory = [];
- $cmd = PHP_STR;
- $opt = PHP_STR;
- $param1 = PHP_STR;
- $param2 = PHP_STR;
- $param3 = PHP_STR;
-
- $user = PHP_STR;
- $userName = PHP_STR;
- $userHint = PHP_STR;
- $userHintResolved = PHP_STR;
- $picPath = PHP_STR;
-
- function showHistory() {
- global $msgHistory;
- global $user;
- global $curPath;
- global $picPath;
-
- $i = 1;
- //echo "curPath=$curPath<br>";
- $oldDate = "";
- foreach($msgHistory as $val) {
- if ((mb_stripos($val, "-master") !== false) && ($user == "MASTER")) {
- $float = "right";
- $bgcolor = "#E3FAE3";
- } else if ((mb_stripos($val, "-master") === false) && ($user != "MASTER")) {
- $float = "right";
- $bgcolor = "#E3FAE3";
- } else {
- $float = "left";
- $bgcolor = "#FFFFFF";
- }
- echo("<div style='width:100%;height:auto;border:0px solid red;margin-bottom:12px;'>");
- $val = rtrim($val,"\n");
- // grab the date
- $date = left($val, 8);
- $date = date("l j F", mktime(0,0,0,substr($date,4,2),right($date,2),left($date,4)));
- if ($date!=$oldDate) {
- echo("<div style='text-align:center;'><span style='background-color:gray;color:#FFFFFF'>$date</span></div><br>");
- $oldDate = $date;
- }
- // grab the time
- preg_match('/^.+-(\d{4})-/i', $val, $matches);
- $time = $matches[1];
- $time = ltrim(left($time,2),"0") . ":" . right($time,2);
- // parsing for file ext
- $fileext = strtolower(pathinfo($val, PATHINFO_EXTENSION));
- if ($fileext === "png" || $fileext === "jpg" || $fileext === "jpeg" || $fileext === "gif") {
- // display the img
- $img = substr($picPath, strlen(APP_PATH)) . DIRECTORY_SEPARATOR . $val;
- echo("<div style='background-color:$bgcolor;float:$float;padding:5px;max-width:300px;min-width:260px;border-radius:2px;'><img src='$img' style='width:100%;'><div style='float:right;font-size:9px;'>$time</div></div><br><br><br>");
- } else {
- // display the msg
- $msg = HTMLencode(file_get_contents($curPath . DIRECTORY_SEPARATOR . "msgs" . DIRECTORY_SEPARATOR . $val));
- echo("<div style='background-color:$bgcolor;float:$float;padding:5px;max-width:300px;min-width:260px;border-radius:2px;'>".str_replace("\n", "<br>", $msg)."<div style='float:right;font-size:9px;'>$time</div></div><br><br><br>");
- }
- echo("<div style='clear:both;'></div>");
- echo("</div>");
- $i++;
- }
- }
-
-
- function updateHistory(&$update, $maxItems) {
- global $msgHistory;
- global $curPath;
- global $picPath;
-
- // Making enough space in $msgHistory for the update..
- $shift = (count($msgHistory) + count($update)) - $maxItems;
- if ($shift > 0) {
- $msgHistory = array_slice($msgHistory, $shift, $maxItems);
- }
- // Adding $msgHistory update..
- if (count($update) > $maxItems) {
- $beginUpd = count($update) - ($maxItems-1);
- } else {
- $beginUpd = 0;
- }
- $update = array_slice($update, $beginUpd, $maxItems);
- foreach($update as $val) {
- $msgHistory[] = $val;
- }
- // Deleting unused message files..
- foreach (glob($curPath . DIRECTORY_SEPARATOR . "msgs" . DIRECTORY_SEPARATOR . "*.msg") as $msgFilePath) {
- $msgFileName = basename($msgFilePath);
- if (!in_array($msgFileName."\n", $msgHistory)) {
- unlink($curPath . DIRECTORY_SEPARATOR . "msgs" . DIRECTORY_SEPARATOR . $msgFileName);
- }
- }
- // Deleting unused pic files..
- foreach (glob($picPath . DIRECTORY_SEPARATOR . "*") as $imgFilePath) {
- $imgFileName = basename($imgFilePath);
- if (!in_array($imgFileName."\n", $msgHistory)) {
- unlink($picPath . DIRECTORY_SEPARATOR . $imgFileName);
- }
- }
-
- // Writing out $msgHistory on disk..
- $filepath = $curPath . DIRECTORY_SEPARATOR . ".HMM_history";
- file_put_contents($filepath, implode('', $msgHistory));
- }
-
- function parseCommand() {
- global $command;
- global $cmd;
- global $opt;
- global $param1;
- global $param2;
- global $param3;
-
- $str = trim($command);
-
- $ipos = stripos($str, PHP_SPACE);
- if ($ipos > 0) {
- $cmd = left($str, $ipos);
- $str = substr($str, $ipos+1);
- } else {
- $cmd = $str;
- return;
- }
-
- if (left($str, 1) === "-") {
- $ipos = stripos($str, PHP_SPACE);
- if ($ipos > 0) {
- $opt = left($str, $ipos);
- $str = substr($str, $ipos+1);
- } else {
- $opt = $str;
- return;
- }
- }
-
- $ipos = stripos($str, PHP_SPACE);
- if ($ipos > 0) {
- $param1 = left($str, $ipos);
- $str = substr($str, $ipos+1);
- } else {
- $param1 = $str;
- return;
- }
-
- $ipos = stripos($str, PHP_SPACE);
- if ($ipos > 0) {
- $param2 = left($str, $ipos);
- $str = substr($str, $ipos+1);
- } else {
- $param2 = $str;
- return;
- }
-
- $ipos = stripos($str, PHP_SPACE);
- if ($ipos > 0) {
- $param3 = left($str, $ipos);
- $str = substr($str, $ipos+1);
- } else {
- $param3 = $str;
- return;
- }
-
- }
-
- function upload() {
- global $curPath;
- global $user;
- global $userName;
- global $picPath;
- //if (trim($message,"\n")!==PHP_STR) {
- // myExecSendMessage();
- //}
- //if (!empty($_FILES['files'])) {
- if (!empty($_FILES['files']['tmp_name'][0])) {
-
- $uploads = (array)fixMultipleFileUpload($_FILES['files']);
-
- //no file uploaded
- if ($uploads[0]['error'] === PHP_UPLOAD_ERR_NO_FILE) {
- //updateHistoryWithErr("No file uploaded.", false);
- return;
- }
-
- foreach($uploads as &$upload) {
-
- switch ($upload['error']) {
- case PHP_UPLOAD_ERR_OK:
- break;
- case PHP_UPLOAD_ERR_NO_FILE:
- //updateHistoryWithErr("One or more uploaded files are missing.", false);
- return;
- case PHP_UPLOAD_ERR_INI_SIZE:
- //updateHistoryWithErr("File exceeded INI size limit.", false);
- return;
- case PHP_UPLOAD_ERR_FORM_SIZE:
- //updateHistoryWithErr("File exceeded form size limit.", false);
- return;
- case PHP_UPLOAD_ERR_PARTIAL:
- //updateHistoryWithErr("File only partially uploaded.", false);
- return;
- case PHP_UPLOAD_ERR_NO_TMP_DIR:
- //updateHistoryWithErr("TMP dir doesn't exist.", false);
- return;
- case PHP_UPLOAD_ERR_CANT_WRITE:
- //updateHistoryWithErr("Failed to write to the disk.", false);
- return;
- case PHP_UPLOAD_ERR_EXTENSION:
- //updateHistoryWithErr("A PHP extension stopped the file upload.", false);
- return;
- default:
- //updateHistoryWithErr("Unexpected error happened.", false);
- return;
- }
-
- if (!is_uploaded_file($upload['tmp_name'])) {
- //updateHistoryWithErr("One or more file have not been uploaded.", false);
- return;
- }
-
- // name
- $name = (string)substr((string)filter_var($upload['name']), 0, 255);
- if ($name == PHP_STR) {
- //updateHistoryWithErr("Invalid file name: " . $name, false);
- return;
- }
- $upload['name'] = $name;
-
- // fileType
- $fileType = substr((string)filter_var($upload['type']), 0, 30);
- $upload['type'] = $fileType;
-
- // tmp_name
- $tmp_name = substr((string)filter_var($upload['tmp_name']), 0, 300);
- if ($tmp_name == PHP_STR || !file_exists($tmp_name)) {
- //updateHistoryWithErr("Invalid file temp path: " . $tmp_name, false);
- return;
- }
- $upload['tmp_name'] = $tmp_name;
-
- //size
- $size = substr((string)filter_var($upload['size'], FILTER_SANITIZE_NUMBER_INT), 0, 12);
- if ($size == "") {
- //updateHistoryWithErr("Invalid file size.", false);
- return;
- }
- $upload["size"] = $size;
- $tmpFullPath = $upload["tmp_name"];
-
- $originalFilename = pathinfo($name, PATHINFO_FILENAME);
- $originalFileExt = pathinfo($name, PATHINFO_EXTENSION);
- $fileExt = strtolower(pathinfo($name, PATHINFO_EXTENSION));
-
- if ($originalFileExt!==PHP_STR) {
- //$destFileName = $originalFilename . "." . $fileExt;
- if ($user === "master") {
- $destFileName = date("Ymd-Hm") . "-" . mt_rand(100000, 999999) . "-master.$fileExt";
- } else {
- $destFileName = date("Ymd-Hm") . "-" . mt_rand(100000, 999999) . "-$userName.$fileExt";
- }
- } else {
- return;
- }
- $destFullPath = $picPath . DIRECTORY_SEPARATOR . $destFileName;
-
- if (file_exists($destFullPath)) {
- //updateHistoryWithErr("destination already exists", false);
- return;
- }
-
- copy($tmpFullPath, $destFullPath);
- // Updating history..
- $output = [];
- $output[] = $destFileName . "\n";
- updateHistory($output, HISTORY_MAX_ITEMS);
-
- // Cleaning up..
-
- // Delete the tmp file..
- unlink($tmpFullPath);
-
- }
-
- }
- }
-
- function myExecSendMessage() {
-
- global $curPath;
- global $message;
- global $user;
- global $userName;
- global $sendSMS;
- global $CONFIG;
- global $userHintResolved;
-
- if (!empty($message)) {
-
- if ($user == "MASTER") {
- $fileName = date("Ymd-Hm") . "-" . mt_rand(100000, 999999) . "-master.msg";
- } else {
- $fileName = date("Ymd-Hm") . "-" . mt_rand(100000, 999999) . "-$userName.msg";
- }
-
- $msg = HTMLencode($message);
- if (right($msg,1)!="\n") {
- $msg = $msg . "\n";
- }
- // Creating the msg file..
- file_put_contents($curPath . DIRECTORY_SEPARATOR . "msgs" . DIRECTORY_SEPARATOR . $fileName, $msg);
-
- // Updating message history..
- $output = [];
- $output[] = $fileName . "\n";
- updateHistory($output, HISTORY_MAX_ITEMS);
-
- if ($user == "MASTER") {
- $smsUser = $userHintResolved;
- } else {
- $smsUser = "MASTER";
- }
-
- // Sending out the sms notifcation..
- if ($sendSMS && SMS_USERNAME!=PHP_STR) {
- $message = array(
- 'To'=>$CONFIG['AUTH'][$smsUser]['PHONE'],
- 'MessagingServiceSid'=>SMS_MESSAGING_SERVICE,
- 'Body'=>SMS_BODY
- );
-
- sendSMS($message, SMS_API_URL, SMS_USERNAME, SMS_PASSWORD);
- }
- }
-
- }
-
-
- $password = filter_input(INPUT_POST, "Password");
- $command = filter_input(INPUT_POST, "CommandLine");
- $message = filter_input(INPUT_POST, "MessageLine");
- $sendSMS1 = filter_input(INPUT_POST, "chkSMS");
- if ($sendSMS1!="") {
- $sendSMS = true;
- } else {
- $sendSMS = false;
- }
- $pwd = PHP_STR;
-
- $userHint = filter_input(INPUT_POST, "userHint");
-
- $userHintResolved = PHP_STR;
- if ($userHint!=PHP_STR) {
- $found=false;
- foreach ($CONFIG['AUTH'] as $key => $val) {
- if ($userHint==$val['USERNAME']) {
- $userHintResolved = $key;
- $found=true;
- break;
- }
- }
- if (!$found) {
- die("Invalid chat!");
- }
- }
-
- $hideSplash = filter_input(INPUT_POST, "hideSplash");
- $hideHCSplash = filter_input(INPUT_POST, "hideHCSplash");
- //echo "password=*$password*<br>";
- if ($password != PHP_STR) {
- $hash = hash("sha256", $password . APP_SALT, false);
-
- $found=false;
- foreach ($CONFIG['AUTH'] as $key => $val) {
- //echo ("username=".$val['USERNAME']."<br>");
- if ($hash==$val['HASH']) {
- $user = $key;
- if ($userHintResolved==PHP_STR) {
- $userHintResolved = $key;
- }
- $found=true;
- break;
- }
- }
- if (!$found) {
- $password=PHP_STR;
- }
-
- if ($password != PHP_STR) {
- $userName = $CONFIG['AUTH'][$user]['USERNAME'];
- $pwd = APP_REPO_PATH . DIRECTORY_SEPARATOR . $CONFIG['AUTH'][$userHintResolved]['REPO_FOLDER'];
- $picPath = APP_PIC_PATH . DIRECTORY_SEPARATOR . $CONFIG['AUTH'][$userHintResolved]['PIC_FOLDER'];
- }
- }
-
- $curPath = APP_REPO_PATH;
- if ($pwd!==PHP_STR) {
- if (left($pwd, strlen(APP_REPO_PATH)) === APP_REPO_PATH) {
- $curPath = $pwd;
- chdir($curPath);
-
- if (!file_exists($curPath . DIRECTORY_SEPARATOR . ".HMM_history")) {
- $output = [];
- file_put_contents($curPath . DIRECTORY_SEPARATOR . ".HMM_history", $output);
- }
- if (!file_exists($curPath . DIRECTORY_SEPARATOR . "msgs")) {
- mkdir("msgs", 0777);
- }
- }
- }
- $ipos = strripos($curPath, PHP_SLASH);
- $curDir = substr($curPath, $ipos);
-
-
- if ($password !== PHP_STR) {
-
- $msgHistory = file($curPath . DIRECTORY_SEPARATOR . ".HMM_history");
-
- parseCommand($command);
- //echo("cmd=" . $cmd . "<br>");
- //echo("opt=" . $opt . "<br>");
- //echo("param1=" . $param1 . "<br>");
- //echo("param2=" . $param2 . "<br>");
-
- //upload();
-
- if (mb_stripos(CMDLINE_VALIDCMDS, "|" . $command . "|")) {
-
- if ($command === "sendmsg") {
- if (trim($message,"\n")!==PHP_STR) {
- myExecSendMessage();
- upload();
- }
- }
-
- } else if (mb_stripos(CMDLINE_VALIDCMDS, "|" . $cmd . "|")) {
-
- } else {
-
- // if I'm not saving data..
- //if (empty($editBoardParams) || $editBoardParams[0]['location']===PHP_STR) {
- // if (empty($_FILES['files']['tmp_name'][0])) {
- // updateHistoryWithErr("invalid command");
- // }
- //}
- }
-
- } else {
-
- $msgHistory = [];
-
- }
-
- ?>
-
- <!DOCTYPE html>
- <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
- <head>
-
- <meta charset="UTF-8"/>
- <meta name="style" content="day1"/>
-
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
-
- <!--
- Copyright 2021, 2024 5 Mode
- This file is part of Homomm.
- Homomm is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- Homomm is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with Homomm. If not, see <https://www.gnu.org/licenses/>.
- -->
-
-
- <title>Homomm: every person its messages..</title>
-
- <link rel="shortcut icon" href="./res/favicon.ico?v=<?php echo(time()); ?>" />
-
- <meta name="description" content="Welcome to <?php echo(APP_NAME); ?>"/>
- <meta name="author" content="5 Mode"/>
- <meta name="robots" content="noindex"/>
-
- <script src="./js/jquery-3.1.0.min.js" type="text/javascript"></script>
- <script src="./js/common.js" type="text/javascript"></script>
- <script src="./js/bootstrap.min.js" type="text/javascript"></script>
- <script src="./js/sha.js" type="text/javascript"></script>
-
- <script src="./js/home.js" type="text/javascript" defer></script>
-
- <link href="./css/bootstrap.min.css" type="text/css" rel="stylesheet">
- <link href="./css/style.css?v=<?php echo(time()); ?>" type="text/css" rel="stylesheet">
-
- <script>
-
- function upload() {
- <?PHP if ($password!==PHP_STR): ?>
- $("input#files").click();
- <?PHP endif; ?>
- }
-
- window.addEventListener("load", function() {
- <?php if($password===PHP_STR):?>
- $("#Password").addClass("emptyfield");
- <?php endif; ?>
- maxY = document.getElementById("Console").scrollHeight;
- //alert(maxY);
- document.getElementById("MessageLine").focus();
- document.getElementById("Console").scrollTop=maxY;
- }, true);
- function hideTitle() {
- $("#myh1").hide("slow");
- }
-
- function startApp() {
- $("#HCsplash").hide("slow");
- $(document.body).css("background","#ffffff");
- $("#frmHC").show();
-
- <?php if (APP_SPLASH): ?>
- $(document.body).css("overflow-y","auto");
- <?php endif; ?>
- }
- <?php if($hideHCSplash!=="1"): ?>
- window.addEventListener("load", function() {
-
- //$("#HCsplash").show();
- //setTimeout("startApp()", 5000);
- $(document.body).css("background","#000000");
- $("#HCsplash").show("slow");
- setTimeout("hideTitle()", 2000);
- setTimeout("startApp()", 4000);
-
- }, true);
- <?php else: ?>
- window.addEventListener("load", function() {
-
- startApp();
-
- });
- <?php endif; ?>
- </script>
-
- </head>
- <body>
- <div id="HCsplash" style="padding-top: 160px; text-align:center;color:#ffffff;display:none;">
- <div id="myh1"><H1>Homomm</H1></div><br>
- <img src="./Public/static/res/HMMlogo2.png" style="width:310px;">
- </div>
- <form id="frmHC" method="POST" action="/" target="_self" enctype="multipart/form-data" style="display:<?php echo(($hideHCSplash==="1"?"inline":"none"));?>;">
- <div class="header">
- <a href="http://homomm.org" target="_blank" style="color:black; text-decoration: none;"><img src="/res/HMMlogo2.png" style="width:48px;"> Homomm</a> <a href="https://github.com/par7133/Homomm" style="color:#000000"><span style="color:#119fe2">on</span> github</a> <a href="mailto:info@homomm.com" style="color:#000000"><span style="color:#119fe2">for</span> feedback</a> <a href="tel:+39-331-4029415" style="font-size:13px;background-color:#15c60b;border:2px solid #15c60b;color:black;height:27px;text-decoration:none;"> get support </a>
- </div>
-
- <div style="clear:both; float:left; padding:8px; width:25%; max-width:250px; height:100%; text-align:center;">
- <?php if ($user!="MASTER"): ?>
- <br><br>
- <img src="/res/HMMgenius.png" alt="HC Genius" title="HC Genius" style="position:relative; left:+6px; width:90%; border: 1px dashed #EEEEEE;">
- <?php else: ?>
- <div style="text-align:left;"> Friends</div><br>
- <div style="position:relative;top:-10px;left:+6px; width:90%; overflow-y:auto; height:244px; border: 1px dashed #EEEEEE;">
- <?php foreach($CONFIG['AUTH'] as $key => $val):
- $myusername = $val['USERNAME'];
- echo("<div class=\"friend\" onclick=\"changeChat('$myusername')\" style=\"text-align:left;cursor:pointer;\"> $myusername</div>");
- endforeach; ?>
- </div>
- <?php endif; ?>
- <div id="upload-cont"><input id="files" name="files[]" type="file" accept=".gif,.png,.jpg,.jpeg" style="visibility: hidden;"></div>
- <br><br>
- <input type="text" id="Password" name="Password" placeholder="password" style="font-size:10px; background:#393939; color:#ffffff; width: 90%; border-radius:3px;" value="<?php echo($password);?>" autocomplete="off"><br>
- <input type="text" id="Salt" placeholder="salt" style="position:relative; top:+5px; font-size:10px; background:#393939; color:#ffffff; width: 90%; border-radius:3px;" autocomplete="off"><br>
- <a href="#" onclick="showEncodedPassword();" style="position:relative; left:-2px; top:+5px; color:#000000; font-size:12px;">Hash Me!</a>
- </div>
- <div style="float:left; width:75%; max-width:950px; height:600px; padding:8px; border-left: 1px solid #2c2f34;">
-
- <?php if (APP_SPLASH): ?>
- <?php if ($hideSplash !== PHP_STR): ?>
- <div id="splash" style="border-radius:20px; position:relative; left:+3px; width:98%; background-color: #33aced; padding: 20px; margin-bottom:8px;">
-
- <button type="button" class="close" aria-label="Close" onclick="closeSplash();" style="position:relative; left:-10px;">
- <span aria-hidden="true">×</span>
- </button>
-
- Hello and welcome to Homomm!<br><br>
-
- Homomm is a light and simple software on premise to exchange multimedia messages with friends.<br><br>
-
- Homomm is released under GPLv3 license, it is supplied AS-IS and we do not take any responsibility for its misusage.<br><br>
-
- Homomm name comes from the two words, "homines" meaning our choise to give chance to the human beings to come first,
- and "mm" for "multimedia messaging".<br><br>
-
- Homomm doesn't want to be a replacement of Whats App, Telegram, Wechat, etc. but simply want to be their alter ago.<br><br>
-
- First step, use the left side panel password and salt fields to create the hash to insert in the config file. Remember to manually set there also the salt value.<br><br>
-
- As you are going to run Homomm in the PHP process context, using a limited web server or phpfpm user, you must follow some simple directives for an optimal first setup:<br>
- <ol>
- <li>Check the permissions of your "Repo" folder in your web app private path; and set its path in the config file.</li>
- <li>In the Repo path create a "user" folder for each user and give to this folder the write permission. Set it appropriately in the config file.</li>
- <li>In the config file, set every "user" information appropriately like in the examples given.</li>
- <li>Configure your <a href="http://twilio.com" style="color:#e6d236;">Twilio</a> account information appropriately to send out sms notification.</li>
- <li>Configure the max history items as required (default: 50).</li>
- </ol>
-
- <br>
-
- Hope you can enjoy it and let us know about any feedback: <a href="mailto:info@homomm.org" style="color:#e6d236;">info@homomm.org</a>
-
- </div>
- <?php endif; ?>
- <?php endif; ?>
-
- Message board<br>
- <div id="Console" style="height:433px; overflow-y:auto; margin-top:10px;">
- <!--<div id="Console" style="height:493px; margin-top:10px;">-->
- <pre id="Consolep" style="min-height:433px;margin-left:5px;padding:10px;border:0px;background:url('/res/console-bg.png'); background-size:cover; color: #000000;">
- <?php showHistory($msgHistory); ?>
- <div style="clear:both"></div>
- </pre>
- </div>
- <pre id="Messagep" style="position:relative;top:-10px;margin-left:5px;padding:10px;padding-top:0px;border:0px;background:url('/res/console-bg.png'); background-size:cover; color: #000000;">
- <div id="MessageL" style="width:100%;position:relative;white-space:nowrap;top:-23px;border:0px solid black;"><div id="MessageK" style="float:left;width:93%;background:url('/res/send-opts-bg.png');white-space:nowrap;position:relative; top:+40px;border:0px solid black;"><textarea id="MessageLine" name="MessageLine" type="text" autocomplete="off" rows="3" placeholder="Message" style="float:left;width:80%;resize:none; background-color: white; color:black; border:0px; border-bottom: 1px dashed #EEEEEE;"></textarea><div id="sendOptions" style="float:left;position:relative;top:-1px;width:16%;min-width:50px;height:59px;white-space:nowrap;padding:3px;font-weight:900;"><input type="checkbox" name="chkSMS" value="sms"> SMS <br><div onclick="upload();" style="position:relative;top:+5px;left:+5px;cursor:pointer;"><img src="/res/upload.png" style="width:22px;"></div><div id="del-attach" onclick="clearUpload()" style="position:relative;top:-48px;left:-60px;display:none;cursor:pointer;"><img src="/res/del-attach.png" style="width:48px;"></div></div></div><div style="float:left;width:7%;position:relative;top:+40px;cursor:pointer;" onclick="sendMessage()"><img src="/res/send.png" style="float:left;width:63px"></div></div>
- <div style="clear:both"></div>
- </pre>
-
- </div>
- <div class="footer">
- <div id="footerCont"> </div>
- <div id="footer"><span style="background:#FFFFFF;opacity:1.0;margin-right:10px;"> A <a href="http://5mode.com">5 Mode</a> project and <a href="http://wysiwyg.systems">WYSIWYG</a> system. Some rights reserved.</span></div>
- </div>
- <input type="hidden" id="CommandLine" name="CommandLine">
- <input type="hidden" name="pwd" value="<?php echo($curPath); ?>" style="color:black">
- <input type="hidden" id="userHint" name="userHint" value="<?php echo($userHint); ?>">
- <input type="hidden" name="hideSplash" value="<?php echo($hideSplash); ?>">
- <input type="hidden" name="hideHCSplash" value="1">
- </form>
- </body>
- </html>
|