コード例 #1
0
ファイル: language.m.php プロジェクト: albertoneto/localhost
function makedefault()
{
    if (!empty($_POST['lang'])) {
        configeditor($_POST);
    }
    $_SESSION['cometchat']['error'] = 'Language details updated successfully';
    echo "1";
}
コード例 #2
0
ファイル: plugins.m.php プロジェクト: albertoneto/localhost
function addchatroomplugin()
{
    global $ts;
    global $crplugins;
    if (!empty($_GET['data'])) {
        array_push($crplugins, $_GET['data']);
        configeditor(array('crplugins' => $crplugins));
        $_SESSION['cometchat']['error'] = 'Plugin successfully activated!';
    }
    header("Location:?module=plugins&action=chatroomplugins&ts={$ts}");
}
コード例 #3
0
function createmoduleprocess()
{
    checktoken();
    $extension = '';
    $error = '';
    $modulename = createslug($_POST['title'], true);
    if ($_FILES["file"]["type"] == "image/gif" || $_FILES["file"]["type"] == "image/jpeg" || $_FILES["file"]["type"] == "image/pjpeg" || $_FILES["file"]["type"] == "image/png") {
        if ($_FILES["file"]["error"] > 0) {
            $error = "Module icon incorrect. Please try again.";
        } else {
            if (file_exists(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "temp" . DIRECTORY_SEPARATOR . $modulename)) {
                unlink(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "temp" . DIRECTORY_SEPARATOR . $modulename);
            }
            $extension = extension($_FILES["file"]["name"]);
            if (!move_uploaded_file($_FILES["file"]["tmp_name"], dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "temp" . DIRECTORY_SEPARATOR . $modulename)) {
                $error = "Unable to copy to temp folder. Please CHMOD temp folder to 777.";
            }
        }
    } else {
        $error = "Module icon not found. Please try again.";
    }
    if (empty($_POST['title'])) {
        $error = "Module title is empty. Please try again.";
    }
    if (empty($_POST['link'])) {
        $error = "Module link is empty. Please try again.";
    }
    if (!empty($error)) {
        $_SESSION['cometchat']['error'] = $error;
        header("Location: ?module=modules&action=createmodule");
        exit;
    }
    mkdir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $modulename);
    copy(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "temp" . DIRECTORY_SEPARATOR . $modulename, dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $modulename . DIRECTORY_SEPARATOR . 'icon.png');
    unlink(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "temp" . DIRECTORY_SEPARATOR . $modulename);
    $code = "\$trayicon[] = array('" . $modulename . "','" . addslashes(addslashes(addslashes(str_replace('"', '', $_POST['title'])))) . "','" . $_POST['link'] . "','" . $_POST['type'] . "','" . $_POST['width'] . "','" . $_POST['height'] . "','','');";
    configeditor('ICONS', $code, 1);
    header("Location:?module=modules");
}
コード例 #4
0
ファイル: settings.php プロジェクト: albertoneto/localhost
\t\t\t<div>
\t\t\t\t<div id="centernav" style="width:380px">
\t\t\t\t\t<div class="title">Unique id:</div>
\t\t\t\t\t<div class="element">
\t\t\t\t\t\t<textarea type="text" class="inputbox" name="announcementpushid">{$announcementpushid}</textarea>
\t\t\t\t\t</div>
\t\t\t\t\t<div style="clear:both;padding:10px;"></div>
\t\t\t\t</div>
\t\t\t</div>

\t\t\t<div style="clear:both;padding:7.5px;"></div>
\t\t\t<input type="submit" value="Update Settings" class="button" />&nbsp;&nbsp;or <a href="javascript:window.close();">cancel or close</a>
\t\t</div>
\t</form>
\t<script type="text/javascript" src="../js.php?admin=1"></script>
\t<script type="text/javascript" language="javascript">
\t\t\$(function() {
\t\t\tsetTimeout(function(){
\t\t\t\tresizeWindow();
\t\t\t},200);
\t\t});
\t\tfunction resizeWindow() {
\t\t\twindow.resizeTo(650, (\$('form').outerHeight(false)+window.outerHeight-window.innerHeight));
\t\t}
\t</script>
EOD;
} else {
    configeditor($_POST);
    header("Location:?module=dashboard&action=loadexternal&type=module&name=announcements");
}
コード例 #5
0
ファイル: extensions.m.php プロジェクト: rezarahimi4861/icmf
function addextension()
{
    checktoken();
    global $extensions;
    if (!empty($_GET['data'])) {
        $extensiondata = '$extensions = array(';
        foreach ($extensions as $extension) {
            $extensiondata .= "'{$extension}',";
        }
        $extensiondata .= "'{$_GET['data']}',";
        $extensiondata = substr($extensiondata, 0, -1) . ');';
        configeditor('EXTENSIONS', $extensiondata);
    }
    header("Location:?module=extensions");
}
コード例 #6
0
function moderatorprocess()
{
    require dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'chatrooms' . DIRECTORY_SEPARATOR . 'config.php';
    $_SESSION['cometchat']['error'] = 'Moderator list successfully modified.';
    $data = '$moderatorUserIDs = array(' . $_POST['moderatorids'] . ');' . "\r\n";
    configeditor('MODERATOR', $data, 0, dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'chatrooms' . DIRECTORY_SEPARATOR . 'config.php');
    header("Location:?module=chatrooms&action=moderator");
}
コード例 #7
0
ファイル: settings.m.php プロジェクト: rezarahimi4861/icmf
function updatecomet()
{
    checktoken();
    $_SESSION['cometchat']['error'] = 'Comet service settings successfully updated';
    $data = "define('USE_COMET','" . $_POST['dou'] . "');\r\ndefine('SAVE_LOGS','" . $_POST['dou2'] . "');\r\ndefine('COMET_HISTORY_LIMIT','" . $_POST['historylimit'] . "');\r\ndefine('KEY_A','" . $_POST['keya'] . "');\r\ndefine('KEY_B','" . $_POST['keyb'] . "');\r\ndefine('KEY_C','" . $_POST['keyc'] . "');";
    configeditor('COMET', $data);
    header("Location:?module=settings&action=comet");
}
コード例 #8
0
ファイル: themes.m.php プロジェクト: Nkelliny/MobileDatingApp
function updatevariablesprocess()
{
    checktoken();
    $colors = $_POST['colors'];
    $_GET['data'] = $_POST['theme'];
    $data = '$themeSettings = array(' . "\r\n";
    foreach ($colors as $field => $input) {
        $data .= "'" . $field . "' => '" . $input . "'," . "\r\n";
    }
    $data .= ");";
    $_SESSION['cometchat']['error'] = 'Theme updated successfully';
    configeditor('SETTINGS', $data, 0, dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $_GET['data'] . DIRECTORY_SEPARATOR . $_GET['data'] . '.php');
    echo 1;
}
コード例 #9
0
ファイル: settings.php プロジェクト: albertoneto/localhost
                                <div id="centernav" style="width:700px">
                                    {$form}
                                </div>
                            </div>
                            <div style="clear:both;padding:7.5px;"></div>
                            <input type="submit" value="Update Settings" class="button">&nbsp;&nbsp;or <a href="javascript:window.close();">cancel or close</a>
                         <div style="clear:both"></div>
                           </div>
                        </form>
                </body>
                <script>
                    function validate(){
                        if((\$("input:[name=chatboxHeight]").val()) < 200) {
                            alert('Height must be greater than 200');
                            return false;
                        } else if((\$("input:[name=chatboxWidth]").val()) < 230){
                            alert('Width must be greater than 230');
                            return false;
                        } else {
                            return true;
                        }
                    }
                </script>
                </html>
EOD;
} else {
    if (!empty($_POST)) {
        configeditor(array('standard_settings' => $_POST));
    }
    header("Location:?module=dashboard&action=loadthemetype&type=theme&name=standard");
}
コード例 #10
0
ファイル: settings.php プロジェクト: albertoneto/localhost
                                <div id="centernav" style="width:700px">
                                    {$form}
                                </div>
                            </div>
                            <div style="clear:both;padding:7.5px;"></div>
                            <input type="submit" value="Update Settings" class="button">&nbsp;&nbsp;or <a href="javascript:window.close();">cancel or close</a>
                         <div style="clear:both"></div>
                           </div>
                        </form>
                </body>
                <script>
                    function validate(){
                        if((\$("input:[name=chatboxHeight]").val()) < 200) {
                            alert('Height must be greater than 200');
                            return false;
                        } else if((\$("input:[name=chatboxWidth]").val()) < 230){
                            alert('Width must be greater than 230');
                            return false;
                        } else {
                            return true;
                        }
                    }
                </script>
                </html>
EOD;
} else {
    if (!empty($_POST)) {
        configeditor(array('hangout_settings' => $_POST));
    }
    header("Location:?module=dashboard&action=loadthemetype&type=theme&name=hangout");
}
コード例 #11
0
ファイル: settings.php プロジェクト: albertoneto/localhost
\t\t\t\t\t<div class="title long">Enable Mobile theme : </div>
\t\t\t\t\t<div class="element topped">
\t\t\t\t\t\t<input type="radio" {$enableMobileTabYes} value="1" name="enableMobileTab">Yes <input type="radio" {$enableMobileTabNo} value="0" name="enableMobileTab">No
\t\t\t\t\t</div>
\t\t\t\t\t<div style="clear:both;padding:10px;"></div>
\t\t\t\t\t<div class="title long">New messages notification : </div>
\t\t\t\t\t<div class="element topped">
\t\t\t\t\t\t<select name="confirmOnAllMessages" id="pluginTypeSelector">
\t\t\t\t\t\t\t<option  value="1" {$zchkd}>Always </option>
\t\t\t\t\t\t\t<option  value="0" {$alchkd}>Once</option>
\t\t\t\t\t\t\t<option  value="2" {$ochkd}>Never</option>
\t\t\t\t\t\t</select>
\t\t\t\t\t\t<div style="clear:both;padding:10px;"></div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t<input type="submit" value="Update Settings" class="button">&nbsp;&nbsp;or <a href="javascript:window.close();">cancel or close</a></div>
\t</form>
\t<script type="text/javascript" src="../js.php?admin=1"></script>
\t<script type="text/javascript" language="javascript">
\t\tsetTimeout(function(){
            resizeWindow();
        },200);
\t\tfunction resizeWindow() {
\t\t\twindow.resizeTo(650, (\$('form').outerHeight(false)+window.outerHeight-window.innerHeight));
\t\t}
\t</script>
EOD;
} else {
    configeditor(array('mobile_settings' => $_POST));
    header("Location:?module=dashboard&action=loadthemetype&type=theme&name=mobile");
}
コード例 #12
0
function updatebaseurl()
{
    checktoken();
    if (!empty($_POST['baseurl'])) {
        $baseurl = $_POST['baseurl'];
        $baseurl = str_replace('\\', '/', $baseurl);
        if ($baseurl[0] != '/') {
            $baseurl = '/' . $baseurl;
        }
        if ($baseurl[strlen($baseurl) - 1] != '/') {
            $baseurl = $baseurl . '/';
        }
        $_SESSION['cometchat']['error'] = 'Base URL successfully modified';
        $data = "define('BASE_URL','{$baseurl}');";
        configeditor('BASE URL', $data);
    }
    header("Location:?module=settings&action=baseurl");
}
コード例 #13
0
ファイル: settings.php プロジェクト: albertoneto/localhost
                                return false;
                            } else if(cbWidth < 300){
                                alert('Width must be greater than 300');
                                return false;
                            } else {
                                return true;
                            }
                        }
                    </script>
                    </html>
EOD;
    }
} else {
    if (!empty($_GET['updatesettings']) && $_GET['updatesettings'] == true) {
        if (isset($_POST['enableType'])) {
            configeditor(array('synergy_settings' => $_POST));
        }
        header("Location:?module=dashboard&action=loadthemetype&type=theme&name=synergy");
    } else {
        include_once dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'config.php';
        $embed_code = '&lt;div id="cometchat_embed_synergy_container" style="width:' . $_POST['chatboxWidth'] . 'px;height:' . $_POST['chatboxHeight'] . 'px;max-width:100%;border:1px solid #CCCCCC;" &gt;&lt;/div&gt;&lt;script src="' . BASE_URL . 'js.php?type=core&name=embedcode" type="text/javascript"&gt;&lt;/script&gt;&lt;script&gt;var iframeObj = {};iframeObj.module="synergy";iframeObj.style="min-height:420px;min-width:300px;";iframeObj.width="' . $_POST['chatboxWidth'] . 'px";iframeObj.height="' . $_POST['chatboxHeight'] . 'px";iframeObj.src="' . BASE_URL . 'cometchat_popout.php"; if(typeof(addEmbedIframe)=="function"){addEmbedIframe(iframeObj);}&lt;/script&gt;';
        echo <<<EOD
                <!DOCTYPE html>
                <html>
                    <head>
                        <script type="text/javascript" src="../js.php?admin=1"></script>
                        <script type="text/javascript" language="javascript">
                            \$(function() {
                                setTimeout(function(){
                                    resizeWindow();
                                },200);
コード例 #14
0
ファイル: settings.php プロジェクト: albertoneto/localhost
                                <div id="centernav" style="width:700px">
                                    {$form}
                                </div>
                            </div>
                            <div style="clear:both;padding:7.5px;"></div>
                            <input type="submit" value="Update Settings" class="button">&nbsp;&nbsp;or <a href="javascript:window.close();">cancel or close</a>
                         <div style="clear:both"></div>
                           </div>
                        </form>
                </body>
                <script>
                    function validate(){
                        if((\$("input:[name=chatboxHeight]").val()) < 200) {
                            alert('Height must be greater than 200');
                            return false;
                        } else if((\$("input:[name=chatboxWidth]").val()) < 230){
                            alert('Width must be greater than 230');
                            return false;
                        } else {
                            return true;
                        }
                    }
                </script>
                </html>
EOD;
} else {
    if (!empty($_POST)) {
        configeditor(array('lite_settings' => $_POST));
    }
    header("Location:?module=dashboard&action=loadthemetype&type=theme&name=lite");
}
コード例 #15
0
function makedefault()
{
    checktoken();
    $icons = '';
    if (!empty($_POST['lang'])) {
        $data = '$lang = \'' . $_POST['lang'] . '\';';
        configeditor('LANGUAGE', $data, 0);
    }
    $_SESSION['cometchat']['error'] = 'Language details updated successfully';
    echo "1";
}
コード例 #16
0
ファイル: settings.php プロジェクト: albertoneto/localhost
        $fileName = $timestamp . '_' . $_FILES['newImg']['name'];
        if (@move_uploaded_file($_FILES['newImg']['tmp_name'], dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . "writable" . DIRECTORY_SEPARATOR . "images" . DIRECTORY_SEPARATOR . "smileys" . DIRECTORY_SEPARATOR . $fileName)) {
            if ($_POST['code'] != 'CC_SMILIES') {
                $uploaded_smileys[$_POST['code']] = $fileName;
                $error = 0;
            }
        } else {
            echo 'CC^CONTROL_error';
            exit;
        }
        echo $fileName;
    } elseif (!empty($_POST['ajaxAction']) && $_POST['ajaxAction'] == 'del') {
        unset($uploaded_smileys[$_POST['code']]);
        unlink(dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . "writable" . DIRECTORY_SEPARATOR . "images" . DIRECTORY_SEPARATOR . "smileys" . DIRECTORY_SEPARATOR . $_POST['imgUrl']);
        $error = 0;
        echo 1;
    }
    if (!$error) {
        configeditor(array('uploaded_smileys' => $uploaded_smileys));
        if (empty($_POST['ajaxAction'])) {
            $_SESSION['cometchat']['error'] = 'Smiley added successfully';
        }
    }
    if (!empty($_POST['smlWidth']) && !empty($_POST['smlHeight'])) {
        configeditor(array('smlWidth' => $_POST['smlWidth']));
        configeditor(array('smlHeight' => $_POST['smlHeight']));
    }
    if (empty($_POST['ajaxAction'])) {
        header("Location:?module=dashboard&action=loadexternal&type=plugin&name=smilies");
    }
}
コード例 #17
0
ファイル: extensions.m.php プロジェクト: rodino25/tsv2
function updateorder()
{
    if (!empty($_POST['order'])) {
        $extensiondata = '$extensions = array(';
        $extensiondata .= $_POST['order'];
        $extensiondata = substr($extensiondata, 0, -1) . ');';
        configeditor('EXTENSIONS', $extensiondata);
    } else {
        $extensiondata = '$extensions = array();';
        configeditor('EXTENSIONS', $extensiondata);
    }
    echo "1";
}
コード例 #18
0
ファイル: themes.m.php プロジェクト: albertoneto/localhost
function themestypemakedefault()
{
    if (!empty($_POST['theme'])) {
        configeditor($_POST);
        $_SESSION['cometchat']['error'] = 'Successfully updated theme. Please clear your browser cache and try.';
    }
    echo "1";
}
コード例 #19
0
function unbanusersprocess()
{
    global $ts;
    global $bannedUserIDs;
    global $bannedUserIPs;
    global $bannedMessage;
    global $bannedWords;
    $bannedids = $bannedUserIDs;
    if (($key = array_search($_GET['bannedids'], $bannedids)) !== false) {
        unset($bannedids[$key]);
    }
    $bannedids = implode(',', $bannedids);
    $bannedips = '';
    foreach ($bannedUserIPs as $b) {
        $bannedips .= '\'' . $b . '\',';
    }
    $bannedw = '';
    foreach ($bannedWords as $b) {
        $bannedw .= "'" . $b . '\',';
    }
    $_SESSION['cometchat']['error'] = 'Ban ID list successfully modified.';
    $data = '$bannedWords = array( ' . $bannedw . ' );' . "\r\n" . '$bannedUserIPs = array( ' . $bannedips . ' );' . "\r\n" . '$bannedUserIDs = array(' . $bannedids . ');' . "\r\n" . '$bannedMessage = \'' . $bannedMessage . '\';';
    configeditor('BANNED', $data);
    header("Location:?module=settings&action=searchlogs&susername={$_GET['susername']}&ts={$ts}");
}
コード例 #20
0
ファイル: settings.php プロジェクト: albertoneto/localhost
                                <div id="centernav" style="width:700px">
                                    {$form}
                                </div>
                            </div>
                            <div style="clear:both;padding:7.5px;"></div>
                            <input type="submit" value="Update Settings" class="button">&nbsp;&nbsp;or <a href="javascript:window.close();">cancel or close</a>
                         <div style="clear:both"></div>
                           </div>
                        </form>
                </body>
                <script>
                    function validate(){
                        if((\$("input:[name=chatboxHeight]").val()) < 200) {
                            alert('Height must be greater than 200');
                            return false;
                        } else if((\$("input:[name=chatboxWidth]").val()) < 230){
                            alert('Width must be greater than 230');
                            return false;
                        } else {
                            return true;
                        }
                    }
                </script>
                </html>
EOD;
} else {
    if (!empty($_POST)) {
        configeditor(array('tapatalk_settings' => $_POST));
    }
    header("Location:?module=dashboard&action=loadthemetype&type=theme&name=tapatalk");
}
コード例 #21
0
ファイル: settings.php プロジェクト: phonglanpls/jz-proj-2012
<form action="?module=dashboard&action=loadexternal&type=module&name=facebook&process=true" method="post">
<div id="content">
\t\t<h2>Settings</h2>
\t\t<h3>If you are unsure about any value, please skip them</h3>
\t\t<div>
\t\t\t<div id="centernav" style="width:380px">
\t\t\t\t<div class="title">Facebook Fan Page ID:</div><div class="element"><input type="text" class="inputbox" name="pageId" value="{$pageId}"></div>
\t\t\t\t<div style="clear:both;padding:5px;"></div>
\t\t\t\t<div class="title">Facebook Fan Page Name:</div><div class="element"><input type="text" class="inputbox" name="pageName" value="{$pageName}"></div>
\t\t\t\t<div style="clear:both;padding:5px;"></div>
\t\t\t\t\t<div class="title">Display activity stream?</div><div class="element"><input name="displayStream" {$displayStreamYes} value="1"   type="radio">Yes <input name="displayStream" value="0" type="radio" {$displayStreamNo}>No</div>
\t\t\t\t<div style="clear:both;padding:5px;"></div>
\t\t\t\t<div class="title">Number of connections:</div><div class="element"><input type="text" class="inputbox" name="connections" value="{$connections}"></div>
\t\t\t\t<div style="clear:both;padding:5px;"></div>
\t\t\t</div>
\t\t</div>

\t\t<div style="clear:both;padding:7.5px;"></div>
\t\t<input type="submit" value="Update Settings" class="button">&nbsp;&nbsp;or <a href="javascript:window.close();">cancel or close</a>
\t\t<input type="hidden" value="{$_SESSION['token']}" name="token">
</div>
</form>
EOD;
} else {
    $data = '';
    foreach ($_POST as $field => $value) {
        $data .= '$' . $field . ' = \'' . $value . '\';' . "\r\n";
    }
    configeditor('SETTINGS', $data, 0, dirname(__FILE__) . '/config.php');
    header("Location:?module=dashboard&action=loadexternal&type=module&name=facebook");
}
コード例 #22
0
ファイル: settings.m.php プロジェクト: kostastzo/Cometchat
function updateauthmode()
{
    global $ts;
    global $ccactiveauth;
    $auth_mode = 0;
    if ($_POST['auth_mode'] == 'cc_auth') {
        $auth_mode = 1;
    }
    if (USE_CCAUTH != $auth_mode) {
        $sql = "truncate table `cometchat`;truncate table cometchat_block;truncate table cometchat_chatroommessages;truncate table cometchat_chatrooms;truncate table cometchat_chatrooms_users;truncate table cometchat_comethistory;truncate table cometchat_status;CREATE TABLE IF NOT EXISTS `cometchat_users` (`id` int(11) NOT NULL AUTO_INCREMENT,`username` varchar(100) NOT NULL,`displayname` varchar(100) NOT NULL,`avatar` varchar(200) NOT NULL,`link` varchar(200) NOT NULL,`grp` varchar(25) NOT NULL,PRIMARY KEY (`id`),UNIQUE KEY `username` (`username`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
        mysqli_multi_query($GLOBALS['dbh'], $sql);
    }
    $ccactiveauthdata = 'define(\'USE_CCAUTH\',\'' . $auth_mode . '\');' . "\n\n" . '$ccactiveauth = array(';
    foreach ($_POST as $option => $value) {
        if ($option != 'auth_mode') {
            if ($option == 'cc_auth_order') {
                $ccactiveauthdata .= substr($value, 0, -1) . ');' . "\r\n\n";
            } else {
                $ccactiveauthdata .= '$' . $option . ' = \'' . $value . '\';' . "\n";
            }
        }
    }
    configeditor('CCAUTH', $ccactiveauthdata);
    $_SESSION['cometchat']['error'] = 'Authentication Mode details updated successfully';
    header("Location:?module=settings&action=ccauth&ts={$ts}");
}
コード例 #23
0
ファイル: settings.php プロジェクト: albertoneto/localhost
                                <div id="centernav" style="width:700px">
                                    {$form}
                                </div>
                            </div>
                            <div style="clear:both;padding:7.5px;"></div>
                            <input type="submit" value="Update Settings" class="button">&nbsp;&nbsp;or <a href="javascript:window.close();">cancel or close</a>
                         <div style="clear:both"></div>
                           </div>
                        </form>
                </body>
                <script>
                    function validate(){
                        if((\$("input:[name=chatboxHeight]").val()) < 200) {
                            alert('Height must be greater than 200');
                            return false;
                        } else if((\$("input:[name=chatboxWidth]").val()) < 230){
                            alert('Width must be greater than 230');
                            return false;
                        } else {
                            return true;
                        }
                    }
                </script>
                </html>
EOD;
} else {
    if (!empty($_POST)) {
        configeditor(array('facebook_settings' => $_POST));
    }
    header("Location:?module=dashboard&action=loadthemetype&type=theme&name=facebook");
}
コード例 #24
0
ファイル: modules.m.php プロジェクト: albertoneto/localhost
function createmoduleprocess()
{
    global $ts;
    global $trayicon;
    $extension = '';
    $error = '';
    $modulename = createslug($_POST['title'], true);
    if ($_FILES["file"]["type"] == "image/gif" || $_FILES["file"]["type"] == "image/jpeg" || $_FILES["file"]["type"] == "image/pjpeg" || $_FILES["file"]["type"] == "image/png") {
        if ($_FILES["file"]["error"] > 0) {
            $error = "Module icon incorrect. Please try again.";
        } else {
            if (file_exists(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "temp" . DIRECTORY_SEPARATOR . $modulename)) {
                unlink(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "temp" . DIRECTORY_SEPARATOR . $modulename);
            }
            $extension = extension($_FILES["file"]["name"]);
            if (!move_uploaded_file($_FILES["file"]["tmp_name"], dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "temp" . DIRECTORY_SEPARATOR . $modulename)) {
                $error = "Unable to copy to temp folder. Please CHMOD temp folder to 777.";
            }
        }
    } else {
        $error = "Module icon not found. Please try again.";
    }
    if (empty($_POST['title'])) {
        $error = "Module title is empty. Please try again.";
    }
    if (!empty($_POST['embed_type'])) {
        if ($_POST['embed_type'] == 'link') {
            if (empty($_POST['link'])) {
                $error = "Module link is empty. Please try again.";
            }
        } else {
            if (empty($_POST['embeded_code'])) {
                $error = "Module embed code is empty. Please try again.";
            }
        }
    }
    if (!empty($error)) {
        $_SESSION['cometchat']['error'] = $error;
        header("Location: ?module=modules&action=createmodule&ts={$ts}");
        exit;
    }
    mkdir(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $modulename, 0777);
    copy(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "temp" . DIRECTORY_SEPARATOR . $modulename, dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $modulename . DIRECTORY_SEPARATOR . 'icon.png');
    unlink(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "temp" . DIRECTORY_SEPARATOR . $modulename);
    if (!empty($_POST['embeded_code'])) {
        $filePath = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $modulename . DIRECTORY_SEPARATOR . 'index.html';
        $createFile = fopen($filePath, 'w');
        fwrite($createFile, $_POST['embeded_code']);
        fclose($createFile);
        $code = "\$trayicon['" . $modulename . "'] = array('" . $modulename . "','" . addslashes(addslashes(addslashes(str_replace('"', '', ucfirst($_POST['title']))))) . "','modules/" . $modulename . "/index.html','" . $_POST['type'] . "','" . $_POST['width'] . "','" . $_POST['height'] . "','','1','','1');";
    } else {
        $code = "\$trayicon['" . $modulename . "'] = array('" . $modulename . "','" . addslashes(addslashes(addslashes(str_replace('"', '', ucfirst($_POST['title']))))) . "','" . $_POST['link'] . "','" . $_POST['type'] . "','" . $_POST['width'] . "','" . $_POST['height'] . "','','','','0');";
    }
    eval($code);
    configeditor(array('trayicon' => $trayicon));
    header("Location:?module=modules&ts={$ts}");
}
コード例 #25
0
ファイル: chatrooms.m.php プロジェクト: kostastzo/Cometchat
function removemoderatorprocess()
{
    global $ts;
    global $moderatorUserIDs;
    include_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'chatrooms' . DIRECTORY_SEPARATOR . 'config.php';
    $_SESSION['cometchat']['error'] = 'Moderator list successfully modified.';
    $newmoderatorUserIDs = $moderatorUserIDs;
    if (($key = array_search($_GET['moderatorid'], $newmoderatorUserIDs)) !== false) {
        unset($newmoderatorUserIDs[$key]);
    }
    $moderatorUserIDsList = implode(',', $newmoderatorUserIDs);
    $data = '$moderatorUserIDs = array(' . $moderatorUserIDsList . ');' . "\r\n";
    configeditor('MODERATOR', $data, 0, dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'chatrooms' . DIRECTORY_SEPARATOR . 'config.php');
    if (isset($_GET['autosuggest'])) {
        header("Location:?module=chatrooms&action=finduser&ts={$ts}");
        exit;
    }
    header("Location:?module=chatrooms&action=searchlogs&susername={$_GET['susername']}&ts={$ts}");
}
コード例 #26
0
ファイル: chatrooms.m.php プロジェクト: albertoneto/localhost
function removemoderatorprocess()
{
    global $ts;
    global $moderatorUserIDs;
    $_SESSION['cometchat']['error'] = 'Moderator list successfully modified.';
    if (($key = array_search($_GET['moderatorid'], $moderatorUserIDs)) !== false) {
        unset($moderatorUserIDs[$key]);
    }
    configeditor(array('moderatorUserIDs' => $moderatorUserIDs));
    if (isset($_GET['autosuggest'])) {
        header("Location:?module=chatrooms&action=finduser&ts={$ts}");
        exit;
    }
    header("Location:?module=chatrooms&action=searchlogs&susername={$_GET['susername']}&ts={$ts}");
}
コード例 #27
0
function addchatroomplugin()
{
    global $ts;
    global $crplugins;
    if (!empty($_GET['data'])) {
        $plugindata = '$crplugins = array(';
        foreach ($crplugins as $plugin) {
            $plugindata .= "'{$plugin}',";
        }
        $plugindata .= "'{$_GET['data']}',";
        $plugindata = substr($plugindata, 0, -1) . ');';
        configeditor('CHATROOMPLUGINS', $plugindata);
    }
    header("Location:?module=plugins&action=chatroomplugins&ts={$ts}");
}
コード例 #28
0
function updateorder()
{
    if (!empty($_POST['order'])) {
        configeditor(array('extensions' => $_POST['order']));
    } else {
        configeditor(array('extensions' => array()));
    }
    echo "1";
}
コード例 #29
0
ファイル: settings.php プロジェクト: rodino25/tsv2
\t\t\t\t<div class="title long">Maximum poll-time in milliseconds</div><div class="element"><input type="text" class="inputbox short" name="maxHeartbeat" value="{$maxHeartbeat}"></div>
\t\t\t\t<div style="clear:both;padding:5px;"></div>

\t\t\t\t<div class="title long">Auto enter chatroom ID</div><div class="element"><input type="text" class="inputbox short" name="autoLogin" value="{$autoLogin}"></div>
\t\t\t\t<div style="clear:both;padding:5px;"></div>

\t\t\t\t<div class="title long">Beep on new messages</div><div class="element toppad"><input name="messageBeep" {$messageBeepYes} value="1"   type="radio">Yes <input name="messageBeep" value="0" type="radio" {$messageBeepNo}>No</div>\t\t\t\t

\t\t\t</div>
\t\t</div>

\t\t<div style="clear:both;padding:7.5px;"></div>
\t\t<input type="submit" value="Update Settings" class="button">&nbsp;&nbsp;or <a href="javascript:window.close();">cancel or close</a>
</div>
</form>
 <script type="text/javascript" src="../js.php?admin=1"></script>
            <script type="text/javascript" language="javascript">
                resizeWindow();
                function resizeWindow() {
                    window.resizeTo((\$("form").width()+30), (\$("form").height()+85));
                }
            </script>
EOD;
} else {
    $data = '';
    foreach ($_POST as $field => $value) {
        $data .= '$' . $field . ' = \'' . $value . '\';' . "\r\n";
    }
    configeditor('SETTINGS', $data, 0, dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.php');
    header("Location:?module=dashboard&action=loadexternal&type=module&name=chatrooms");
}
コード例 #30
0
ファイル: settings.m.php プロジェクト: albertoneto/localhost
function updatestoragemode()
{
    global $ts;
    $_POST['aws_bucket_url'] = preg_replace('#^http(s)?://#', '', rtrim($_POST['aws_bucket_url'], '/'));
    configeditor($_POST);
    $_SESSION['cometchat']['error'] = 'Storage mode details updated successfully';
    header("Location:?module=settings&action=storage&ts={$ts}");
}