コード例 #1
0
ファイル: code.php プロジェクト: alpar/Tangram-tools
        }
    }
    return $viewSource ? htmlspecialchars($code) : $code;
}
//版本
$version = $_REQUEST["version"];
//导入的 包
$src = $_REQUEST["src"];
//是否不包含base部分
$nobase = !isset($_REQUEST["nobase"]) || strtolower($_REQUEST["nobase"]) == "false" ? false : true;
//压缩类型  yui  mini  pack  其他值为不压缩
$compress = $_REQUEST["compress"];
$viewSource = !isset($_REQUEST["viewSource"]) || strtolower($_REQUEST["viewSource"]) == "false" || $_REQUEST["viewSource"] === 0 ? false : true;
header("Cache-Control: no-cache, no-store, max-age=0, must-revalidate");
header("Pragma: no-cache");
$code = do_merge($version, $src, $nobase, $compress, $viewSource);
if ($viewSource || $compress == "source") {
    $code = preg_replace("/\\/\\/ Copy.*?\\/\\/ limitations under the License\\.?/msi", "", $code);
    $code = preg_replace("/\\/\\*\\s*\\*\\s*Tangram.*?\\*\\/\n*/msi", "", $code);
    $copyright = <<<COPYRIGHT
// Copyright (c) 2009, Baidu Inc. All rights reserved.
// 
// Licensed under the BSD License
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//      http:// tangram.baidu.com/license.html
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
コード例 #2
0
ファイル: moderation.php プロジェクト: keweiliu6/test_smf1
function mob_m_merge_topic($rpcmsg)
{
    global $mobdb, $func, $board, $topic, $context;
    // Get the topics
    $topic_1 = $rpcmsg->getScalarValParam(1);
    $topic_2 = $rpcmsg->getScalarValParam(0);
    if ($topic_1 == $topic_2) {
        mob_error('same topic');
    }
    $topicinfo_1 = get_topicinfo($topic_1);
    $topicinfo_2 = get_topicinfo($topic_2);
    if (empty($topicinfo_1) || empty($topicinfo_2)) {
        mob_error('topics not found');
    }
    $topic = $topic_1;
    $board = $topicinfo_1['id_board'];
    loadBoard();
    loadPermissions();
    // do_merge will check for our permissions
    do_merge(array($topic_1, $topic_2));
    // Return a true response
    return new xmlrpcresp(new xmlrpcval(array('result' => new xmlrpcval(true, 'boolean')), 'struct'));
}
コード例 #3
0
ファイル: index.php プロジェクト: cpeel/dproofreaders-shadow
                            }
                            echo "</pre><br>";
                        } else {
                            echo "<p>" . _("<code>xgettext</code> ran successfully.") . "</p>";
                        }
                        echo "<p><a href='{$translate_url}'>" . _("Back to the Translation Center") . "</a></p>";
                    } else {
                        if ($func == "upload") {
                            $locale = validate_locale($_REQUEST['locale']);
                            do_upload($locale);
                            echo "<p><a href='{$translate_url}?func=manage&amp;locale={$locale}'>" . sprintf(_("Back to manage locale %s"), $locale) . "</a></p>";
                        } else {
                            if ($func == "merge") {
                                $locale = validate_locale($_REQUEST['locale']);
                                $fuzzy = @$_REQUEST['fuzzy'];
                                do_merge($locale, $fuzzy);
                                echo "<p><a href='{$translate_url}?func=manage&amp;locale={$locale}'>" . sprintf(_("Back to manage locale %s"), $locale) . "</a></p>";
                            } else {
                                if ($func == "manage") {
                                    $locale = validate_locale($_REQUEST['locale']);
                                    manage_form($locale);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
function main_form()