当前位置: 首页>>代码示例>>PHP>>正文


PHP configeditor函数代码示例

本文整理汇总了PHP中configeditor函数的典型用法代码示例。如果您正苦于以下问题:PHP configeditor函数的具体用法?PHP configeditor怎么用?PHP configeditor使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了configeditor函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: makedefault

function makedefault()
{
    if (!empty($_POST['lang'])) {
        configeditor($_POST);
    }
    $_SESSION['cometchat']['error'] = 'Language details updated successfully';
    echo "1";
}
开发者ID:albertoneto,项目名称:localhost,代码行数:8,代码来源:language.m.php

示例2: addchatroomplugin

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}");
}
开发者ID:albertoneto,项目名称:localhost,代码行数:11,代码来源:plugins.m.php

示例3: createmoduleprocess

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");
}
开发者ID:Nkelliny,项目名称:MobileDatingApp,代码行数:39,代码来源:modules.m.php

示例4: resizeWindow

\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");
}
开发者ID:albertoneto,项目名称:localhost,代码行数:30,代码来源:settings.php

示例5: addextension

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");
}
开发者ID:rezarahimi4861,项目名称:icmf,代码行数:15,代码来源:extensions.m.php

示例6: moderatorprocess

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");
}
开发者ID:jorgemunoz8807,项目名称:havanabook,代码行数:8,代码来源:chatrooms.m.php

示例7: updatecomet

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");
}
开发者ID:rezarahimi4861,项目名称:icmf,代码行数:8,代码来源:settings.m.php

示例8: updatevariablesprocess

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;
}
开发者ID:Nkelliny,项目名称:MobileDatingApp,代码行数:14,代码来源:themes.m.php

示例9: validate

                                <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");
}
开发者ID:albertoneto,项目名称:localhost,代码行数:31,代码来源:settings.php

示例10: resizeWindow

\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");
}
开发者ID:albertoneto,项目名称:localhost,代码行数:31,代码来源:settings.php

示例11: updatebaseurl

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");
}
开发者ID:jorgemunoz8807,项目名称:havanabook,代码行数:18,代码来源:settings.m.php

示例12: if

                                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);
开发者ID:albertoneto,项目名称:localhost,代码行数:31,代码来源:settings.php

示例13: makedefault

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";
}
开发者ID:Nkelliny,项目名称:MobileDatingApp,代码行数:11,代码来源:language.m.php

示例14: elseif

        $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");
    }
}
开发者ID:albertoneto,项目名称:localhost,代码行数:31,代码来源:settings.php

示例15: updateorder

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";
}
开发者ID:rodino25,项目名称:tsv2,代码行数:13,代码来源:extensions.m.php


注:本文中的configeditor函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。