예제 #1
0
# PODCAST GENERATOR
#
# Created by Alberto Betella
# http://podcastgen.sourceforge.net
#
# This is Free Software released under the GNU/GPL License.
############################################################
########### Security code, avoids cross-site scripting (Register Globals ON)
if (isset($_REQUEST['GLOBALS']) or isset($_REQUEST['absoluteurl']) or isset($_REQUEST['amilogged']) or isset($_REQUEST['theme_path'])) {
    exit;
}
########### End
include 'checkconfigexistence.php';
$PG_mainbody = NULL;
//define
$listWithLanguages = languagesList($absoluteurl, TRUE);
## SCRIPT LANGUAGES LIST
$PG_mainbody .= '

	<form method="post" action="index.php?step=2">

	<p><label for="setuplanguage"><b>Select Language</b></label></p>
	';
$PG_mainbody .= '<select name="setuplanguage">';
natcasesort($listWithLanguages);
// Natcasesort orders more naturally and is different from "sort", which is case sensitive
$browserlanguage = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2);
// Extract browser locale (en, es, it)
$browserlanguage .= '_' . strtoupper($browserlanguage);
//this way we obtain the complete locale (e.g. en_EN, es_ES, it_IT)
foreach ($listWithLanguages as $key => $val) {
			<br /><br />
			<p><label for="subtitle"><b>' . _("Podcast Subtitle or Slogan") . '</b></label></p>
			<input name="subtitle" type="text" id="title" size="50" maxlength="255" value="' . $podcast_subtitle . '">
			<br /><br />
			<p><label for="description"><b>' . _("Podcast Description") . '</b></label></p>
			<textarea name="description" cols="50" rows="3">' . $podcast_description . '</textarea>	
			<br /><br />
			<p><label for="copyright_notice"><b>' . _("Copyright Notice") . '</b></label></p>
			<input name="copyright_notice" type="text" id="title" size="50" maxlength="255" value="' . $copyright . '">	
			<br /><br />
			<p><label for="authorname"><b>' . _("Author's name") . '</b></label></p>
			<input name="authorname" type="text" id="title" size="50" maxlength="255" value="' . $author_name . '">	
			<br /><br />
			<p><label for="authoremail"><b>' . _("Author's email address") . '</b></label></p>
			<input name="authoremail" type="text" id="title" size="50" maxlength="255" value="' . $author_email . '">';
        $listWithLanguages = languagesList($absoluteurl, FALSE);
        ## FEED LANGUAGES LIST
        $PG_mainbody .= '<br /><br /><p><label for="feedlanguage"><b>' . _("Feed language") . '</b></label></p>
			<p><span class="alert">' . _("Main language of your episodes") . '</span></p>
			';
        $PG_mainbody .= '<select name="feedlanguage">';
        natcasesort($listWithLanguages);
        // Natcasesort orders more naturally and is different from "sort", which is case sensitive
        foreach ($listWithLanguages as $key => $val) {
            $PG_mainbody .= '
				<option value="' . $key . '"';
            if ($feed_language == $key) {
                $PG_mainbody .= ' selected';
            }
            $PG_mainbody .= '>' . $val . '</option>
				';