コード例 #1
0
 public function editTranslation()
 {
     $returnval = array("editor_" . $this->fieldname, "refField_" . $this->fieldname);
     // parameters : areaname, content, hidden field, width, height, rows, cols
     editorArea("editor_" . $this->fieldname, $this->transparams, "refField_" . $this->fieldname, '100%;', '300', '70', '15');
     echo $this->transparams;
     return $returnval;
 }
コード例 #2
0
ファイル: MasterPage.php プロジェクト: justinlyon/scc
 /**
  * Captures the joomla edior object in a string
  * that can be rendered by the template engine.
  *
  * @param bean Editor configuration
  * @return string Representation of the editor as a string
  */
 protected function setEditor($conf)
 {
     // Get the configuration
     $name = $conf->getName() != "" ? $conf->getName() : 'editor';
     $content = $conf->getContent();
     $handle = $conf->getValueField() != "" ? $conf->getValueField() : $name . '_editor';
     $width = $conf->getWidth() != null ? $conf->getWidth() : '100%';
     $height = $conf->getHeight() != null ? $conf->getHeight() : '250';
     $rows = $conf->getRows() != null ? $conf->getRows() : '40';
     $cols = $conf->getCols() != null ? $conf->getCols() : '20';
     // Store the editor in a string
     ob_start();
     editorArea($handle, $content, $name, $width, $height, $rows, $cols);
     $editor = ob_get_contents();
     ob_end_clean();
     return $editor;
 }
コード例 #3
0
    function layout($mailingEdit, $lists, $show)
    {
        if (ACA_CMSTYPE) {
            $editor =& JFactory::getEditor();
        }
        if (!empty($_SESSION['skip_subscribers' . $mailingEdit->id])) {
            echo 'If you click on the Send button, the process will skip the first ' . $_SESSION['skip_subscribers' . $mailingEdit->id] . ' subscribers';
        }
        ?>
	<fieldset class="acajoomcss">
	<legend><?php 
        echo @constant($GLOBALS[ACA . 'listname' . $mailingEdit->list_type]) . ' ' . _ACA_CONTENT;
        ?>
</legend>
	<table class="acajoomtable" cellspacing="1" width="99%">
		<tbody>
		<tr>
			<td valign="top">
		<?php 
        mailingsHTML::subject($mailingEdit, $lists, $show);
        if ($show['htmlcontent']) {
            if ($mailingEdit->html != 0) {
                if (ACA_CMSTYPE) {
                    echo $editor->display('content', $mailingEdit->htmlcontent, '100%', '400', '80', '30');
                } else {
                    editorArea('editor2', $mailingEdit->htmlcontent, 'content', '100%;', '400', '80', '30');
                }
            } else {
                echo '<textarea name="content" rows="20" cols="75">' . $mailingEdit->htmlcontent . '</textarea>';
            }
        }
        ?>
			</td>
			<td valign="top" width="450px">
			<?php 
        if (ACA_CMSTYPE) {
            $config_tabs = new mosTabs15(0);
        } else {
            $config_tabs = new mosTabs(0);
        }
        //endif
        $config_tabs->startPane('acaMailingOptions');
        $config_tabs->startTab(_ACA_LIST_T_GENERAL, 'acaMailingOptions.general');
        mailingsHTML::description($mailingEdit, $lists, $show);
        $config_tabs->endTab();
        $config_tabs->startTab(_ACA_LIST_OPT_TAG, 'acaMailingOptions.options');
        echo '<div style"width:280px;"><span class="editlinktip">';
        $tip = _ACA_INFO_MAILING_CONTENT;
        $title = _ACA_CONTENT;
        echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
        echo '</span><br /><strong>' . _ACA_USABLE_TAGS . '</strong><br />';
        echo _ACA_NAMEREP . '<br />' . _ACA_FIRST_NAME_REP;
        if ($mailingEdit->list_type == 7) {
            echo '<br />' . _ACA_TAGS_AUTONEWS;
        }
        if (class_exists('auto')) {
            echo '<br />' . _ACA_TAGS_ISSUE_NB . '<br />';
            echo '<br />' . _ACA_TAGS_DATE . '<br />';
        }
        if (class_exists('aca_tags')) {
            echo '<br />' . _ACA_TAGS_CB . '<br />';
        }
        echo '</div>';
        $config_tabs->endTab();
        if (!ACA_CMSTYPE) {
            $config_tabs->startTab(_ACA_LIST_OPT_IMG, 'acaMailingOptions.joom15');
            mailingsHTML::images($lists);
            $config_tabs->endTab();
        }
        if ($show['sitecontent']) {
            $config_tabs->startTab(_ACA_LIST_OPT_CTT, 'acaMailingOptions.content');
            echo _ACA_CONTENT_ITEM_SELECT_T;
            //echo _ACA_INSERT_CONTENT.'<br />';
            if (ACA_CMSTYPE) {
                global $mainframe;
                JPluginHelper::importPlugin('acajoom');
                $bot_results = $mainframe->triggerEvent('acajoombot_editabs');
            } else {
                global $_MAMBOTS;
                $_MAMBOTS->loadBotGroup('acajoom');
                $bot_results = $_MAMBOTS->trigger('acajoombot_editabs');
            }
            if (!empty($bot_results)) {
                foreach ($bot_results as $bot_result) {
                    echo $bot_result[1];
                }
            }
            $config_tabs->endTab();
        }
        if ($GLOBALS[ACA . 'show_jcalpro'] and class_exists('pro')) {
            $config_tabs->startTab(_ACA_SHOW_JCALPRO, 'acaMailingOptions.jcalpro');
            mailingsHTML::jcalpro();
            $config_tabs->endTab();
        }
        if ($show['attachement']) {
            $config_tabs->startTab(_ACA_ATTACHMENTS, 'acaMailingOptions.attachement');
            mailingsHTML::attachement($mailingEdit, $lists, $show);
            $config_tabs->endTab();
        }
        $config_tabs->endPane();
        ?>
			</td>
		</tr>


	<?php 
        if ($show['textcontent'] and $mailingEdit->html) {
            ?>
		<tr>
			<td>
				<textarea name="alt_content" rows="20" cols="70" style="width: 100%; height: 400px;"><?php 
            echo $mailingEdit->textonly;
            ?>
</textarea>
			</td>
			<td class="key" style="vertical-align: top;">
				<span class="editlinktip">
				<?php 
            $tip = _ACA_INFO_MAILING_NOHTML;
            $title = _ACA_NONHTML;
            echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
            ?>
				</span><br />
				<strong><?php 
            echo _ACA_USABLE_TAGS;
            ?>
</strong><br />
				<?php 
            echo _ACA_NAMEREP . '<br />' . _ACA_FIRST_NAME_REP;
            if ($mailingEdit->list_type == 7) {
                echo '<br />' . _ACA_TAGS_AUTONEWS;
            }
            ?>

			</td>
		</tr>
	<?php 
        }
        ?>
		</tbody>
	</table>
	</fieldset>
	<?php 
    }
コード例 #4
0
    static function editBook($option, &$row, &$clist, &$wslist, &$langlist, &$langlistshow, &$rating, &$delete_ebook, &$reviews, &$files)
    {
        global $books, $database, $booklibrary_configuration, $my, $mosConfig_live_site, $mainframe, $doc;
        // for J 1.6
        //    $query = "SELECT lang_code, title FROM #__languages";
        //  $database->setQuery($query);
        // $languages = $database->loadObjectList();
        //my !!!!! -------- langdescription   ------------------------------------------------------------------------------------------
        $lg = JFactory::getLanguage();
        $installed = $lg->getKnownLanguages();
        $languages_row[] = mosHTML::makeOption('*', 'All');
        foreach ($installed as $installang) {
            $langname = $installang['name'];
            $languages_row[] = mosHTML::makeOption($langname, $langname);
        }
        @($langlistshow = mosHTML::selectList($languages_row, 'langshow', 'class="inputbox" size="1"', 'value', 'text', $row->langshow));
        //end of my langdecription ---------  !!!!   ---------------------------------------------------------------------------------------
        //echo "<br /><pre>" . print_r($languages_row, true). "</pre>"; exit;
        //---- end of my langdescrition
        $doc->addStyleSheet($mosConfig_live_site . '/components/com_booklibrary/includes/booklibrary.css');
        $doc->addScript($mosConfig_live_site . '/components/com_booklibrary/includes/functions.js');
        $aa = $row->id ? _BOOKLIBRARY_HEADER_EDIT : _BOOKLIBRARY_HEADER_ADD;
        $html = "<div class='book_manager_caption' ><img src='./components/com_booklibrary/images/cfg.png' alt ='' />" . $aa . "</div>";
        $app = JFactory::getApplication();
        $app->JComponentTitle = $html;
        ?>

        <script language="javascript" type="text/javascript">
            function trim(string){return string.replace(/(^\s+)|(\s+$)/g, "");}
            Joomla.submitbutton = function(task) { // for J 1.6
                var bookid = document.getElementById("bookid").value;// for J 1.6
                var isbn = document.getElementById("isbn").value; // OR document.adminForm.isbn.value
                var catid = document.getElementById("catid").value;// for J 1.6
                var titleid = document.getElementById("titleid").value;
                if (task == 'save') {
                    if (trim(bookid) == '') {
                        alert( "<?php 
        echo _BOOKLIBRARY_ADMIN_INFOTEXT_JS_EDIT_BOOKID_CHECK;
        ?>
" );
                        return;
                    } else if ( trim(isbn) == '') {
                        alert( "<?php 
        echo _BOOKLIBRARY_ADMIN_INFOTEXT_JS_EDIT_ISBN_CHECK;
        ?>
" );
                        return;
                    } else if (catid == '0' || catid == '') {
                        alert( "<?php 
        echo _BOOKLIBRARY_ADMIN_INFOTEXT_JS_EDIT_CATEGORY;
        ?>
");
                        return;
                    } else { submitform( task );}} else {submitform( task );}}
        </script>
        <form action="index.php" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data">
            <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform bl_admin_books_book my_table">
                <tr>
                    <td width="15%" align="right">
                        <strong><?php 
        echo _BOOKLIBRARY_LABEL_BOOKID;
        ?>
:</strong>
                    </td>
                    <td width="85%" align="left">
                        <input class="inputbox" type="text" name="bookid" id="bookid" size="20" maxlength="20" value="<?php 
        echo $row->bookid;
        ?>
" />
                    </td>
                </tr>
                <tr>
                    <td width="20%" align="right"><strong><?php 
        echo _BOOKLIBRARY_LABEL_ISBN;
        ?>
:</strong></td>
                    <td align="left">
                        <input class="inputbox" type="text" name="isbn" id="isbn" size="20" maxlength="20" value="<?php 
        echo $row->isbn;
        ?>
" />
                    </td>
                </tr>
                <!-- added dewey decimal code - 20150818 - Ralph deGennaro -->
                <tr>
                    <td width="20%" align="right"><strong><?php 
        echo _BOOKLIBRARY_LABEL_DDCCODE;
        ?>
:</strong></td>
                    <td align="left">
                        <input class="inputbox" type="text" name="ddccode" id="ddccode" size="20" maxlength="20" value="<?php 
        echo $row->ddccode;
        ?>
" />
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="right"><strong><?php 
        echo _BOOKLIBRARY_LABEL_LANGUAGE;
        ?>
:</strong></td>
                    <td align="left"><?php 
        echo $langlist;
        ?>
</td>
                </tr>
                <tr>
                    <td valign="top" align="right"><strong><?php 
        echo _BOOKLIBRARY_LABEL_LANGUAGEDESCRIPTION;
        ?>
:</strong></td>
                    <td align="left"><?php 
        echo $langlistshow;
        ?>
</td>
                </tr>
                <tr>
                    <td valign="top" align="right"><strong><?php 
        echo _BOOKLIBRARY_LABEL_CATEGORY;
        ?>
:</strong></td>
                    <td align="left"><?php 
        echo $clist;
        ?>
</td>
                </tr>
                <tr>
                    <td valign="top" align="right"><strong><?php 
        echo _BOOKLIBRARY_LABEL_FETCH_INFO;
        ?>
:</strong></td>
                    <td align="left">
        <?php 
        echo $wslist;
        ?>
                        &nbsp;&nbsp;&nbsp;<img src="../components/com_booklibrary/images/amazon/com-logo.gif" alt="amazon.com" border="0"/>
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="right"><strong><?php 
        echo _BOOKLIBRARY_LABEL_COMMENT;
        ?>
:</strong></td>
                    <td align="left">
        <?php 
        editorArea('editor1', $row->comment, 'comment', 500, 250, '70', '10');
        ?>
                    </td>
                </tr>
                      <?php 
        if ($booklibrary_configuration['ebooks']['allow']) {
            echo '<tr><td colspan="2"></td></tr>';
            echo "<tr > <td valign='top' align='right'>" . _BOOKLIBRARY_LABEL_EBOOK . ":</td>";
            if (count($files) > 0) {
                for ($i = 0; $i < count($files); $i++) {
                    echo "<tr><td align='right'>" . _BOOKLIBRARY_LABEL_EBOOK_UPLOAD_URL . ($i + 1) . ":";
                    echo "</td><td>";
                    if (isset($files[$i]->location) && substr($files[$i]->location, 0, 4) != "http") {
                        echo "<input type='text' size='60' value='" . $mosConfig_live_site . $files[$i]->location . "' />";
                    } elseif (isset($files[$i]->location) && substr($files[$i]->location, 0, 4) == "http") {
                        echo "<input type='text' size='60' value='" . $files[$i]->location . "' />";
                    }
                    echo "</td></tr>";
                    echo "<tr><td align='right'>" . _BOOKLIBRARY_LABEL_EBOOK_DELETE . ":";
                    echo "</td><td>";
                    echo isset($files[$i]->id) ? "<input type=\"checkbox\" name=\"file_option_del" . $files[$i]->id . "\" value=\"" . $files[$i]->id . "\">" : "";
                    echo "</td></tr>";
                }
            }
            if (count($files) > 0) {
                echo "<td>";
            }
            ?>
                        <td ID="f_items">
                            <input  type="button" name="new_file"
                            value="<?php 
            echo "Add new ebook file";
            ?>
" onClick="new_files()" ID="f_add"/>
                         </td>
        <?php 
            if (count($files) > 0) {
                echo "<td>";
            }
        }
        //---------------------------------Start AJAX load file------------------------------
        ?>
                <script language="javascript" type="text/javascript">
                var request = null;
                var fid=1;
                function createRequest() {
                    if (request != null)
                    return;

                    try {
                        request = new XMLHttpRequest();
                    } catch (trymicrosoft) {
                        try {
                            request = new ActiveXObject("Msxml2.XMLHTTP");
                        } catch (othermicrosoft) {
                            try {
                                request = new ActiveXObject("Microsoft.XMLHTTP");
                            } catch (failed) {
                                request = null;
                            }
                        }
                    }
                    if (request == null)
                        alert(" :-( ___ Error creating request object! ");
                }
                function testInsertFile1(id1,upload){
                    for(var i=1;i<upload_files;i++){
                        if(upload.id != ('new_upload_file'+i) &&
                        document.getElementById('new_upload_file'+i).value==upload.value){
                            return false;
                        }
                    }
                    return true;
                }
                function refreshRandNumber1(id1,upload) {
                    id=id1;
                    if(testInsertFile1(id1,upload)){
                        createRequest();
                        var url = "<?php 
        echo $mosConfig_live_site . '/administrator/components/com_booklibrary/';
        ?>
randNumber.php?file="+upload.value+"&path=<?php 
        echo str_replace("\\", "/", $mosConfig_live_site) . '/components/com_booklibrary/ebooks/';
        ?>
";
                        try{
                        request.onreadystatechange = updateRandNumber1;
                        request.open("GET", url,true);
                        request.send(null);
                        }catch (e )
                        {
                            alert(e);
                        }
                    }
                    else
                    {
                        alert( "You alredy select this file");
                        upload.value="";
                    }
                }
                function updateRandNumber1() {
                    if (request.readyState == 4) {
                        document.getElementById("randNumFile"+fid).innerHTML = request.responseText;
                    }
                }
                </script>
<!-------------------------------- END Ajax load file---------------------------------->
                <script language="javascript" type="text/javascript">
                    var upload_files=0;
                    function new_files(){
                        div=document.getElementById("f_items");
                        button=document.getElementById("f_add");
                        upload_files++;
                        newitem="<table width='50%'><tr><td width='15%'><strong style=\"float:left\">" + "<?php 
        echo _BOOKLIBRARY_LABEL_EBOOK_UPLOAD;
        ?>
" + upload_files + ": </strong></td>";
                        newitem+="<td width='85%'><input style=\"float:left; width:100%\" type=\"file\" onClick=\"document.adminForm.new_upload_file_url"+upload_files+".value ='';\" " +
                        " onChange=\"refreshRandNumber1("+upload_files+
                        ",this);\"  name=\"new_upload_file"+upload_files+"\" "+"id=\"new_upload_file"+upload_files;
                        newitem+="\" value=\"\"size=\"45\">";
                        newitem+="<span id=\"randNumFile"+upload_files+"\" style=\"color:red;\"></span></td></tr></table>";
                        newnode=document.createElement("span");
                        newnode.innerHTML=newitem;
                        div.insertBefore(newnode,button);
                        newitem="<table width='50%'><tr><td width='15%'><strong>" + "<?php 
        echo _BOOKLIBRARY_LABEL_EBOOK_UPLOAD_URL;
        ?>
" + ": </strong></td>";
                        newitem+="<td width='85%'><input style=\"float:left; width:90%\" type=\"text\" name=\"new_upload_file_url"+upload_files+"\" "+"id=\"new_upload_file_url"+upload_files;
                        newitem+="\" value=\"\"size=\"45\"></td></tr></table><br><br />";
                        newnode=document.createElement("span");
                        newnode.innerHTML=newitem;
                        div.insertBefore(newnode,button);
                    }
                </script>

<!--****************************************************end files upload********************************************-->

                <tr>
                    <td colspan="2"><hr size="2" width="100%" /></td>
                </tr>
                <tr>
                    <td valign="top" align="right">&nbsp;</td>
                    <td align="left">
        <?php 
        echo _BOOKLIBRARY_ADMIN_TEXT_WSINFO_TEXT1;
        ?>
                        <strong>
        <?php 
        echo _BOOKLIBRARY_LABEL_FETCH_INFO;
        ?>
                            ->
        <?php 
        echo _BOOKLIBRARY_WS_NO;
        ?>
                        </strong>
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="right">
                        <strong><?php 
        echo _BOOKLIBRARY_LABEL_TITLE;
        ?>
:</strong>
                    </td>
                    <td align="left">
                        <input class="inputbox" id="titleid" type="text" name="title" size="80" value="<?php 
        echo $row->title;
        ?>
" />
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="right">
                        <strong><?php 
        echo _BOOKLIBRARY_LABEL_AUTHORS;
        ?>
:</strong>
                    </td>
                    <td align="left">
                        <input class="inputbox" type="text" name="authors" size="80" value="<?php 
        echo $row->authors;
        ?>
" />
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="right">
                        <strong><?php 
        echo _BOOKLIBRARY_LABEL_MANUFACTURER;
        ?>
:</strong>
                    </td>
                    <td align="left">
                        <input class="inputbox" type="text" name="manufacturer" size="80" value="<?php 
        echo $row->manufacturer;
        ?>
" />
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="right">
                        <strong><?php 
        echo _BOOKLIBRARY_LABEL_PUB_DATE;
        ?>
:</strong>
                    </td>
                    <td align="left">
                        <input class="inputbox" type="text" name="release_Date" size="30" value="<?php 
        echo $row->release_Date;
        ?>
" />
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="right">
                        <strong><?php 
        echo _BOOKLIBRARY_LABEL_PRICE;
        ?>
:</strong>
                    </td>
                    <td align="left">
                        <input class="inputbox" type="text" name="price" size="15" value="<?php 
        echo $row->price;
        ?>
" />
                        <input class="inputbox" type="text" name="priceunit" size="6" value="<?php 
        echo $row->priceunit;
        ?>
" />
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="right">
                        <strong><?php 
        echo _BOOKLIBRARY_LABEL_EDITION;
        ?>
:</strong>
                    </td>
                    <td align="left">
                        <input class="inputbox" type="text" name="edition" size="45" value="<?php 
        echo $row->edition;
        ?>
" />
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="right">
                        <strong><?php 
        echo _BOOKLIBRARY_LABEL_NUMPAGES;
        ?>
:</strong>
                    </td>
                    <td align="left">
                        <input class="inputbox" type="text" name="numberOfPages" size="6" value="<?php 
        echo $row->numberOfPages;
        ?>
" />
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="right">
                        <strong><?php 
        echo _BOOKLIBRARY_LABEL_PICTURE_URL;
        ?>
:</strong>
                    </td>
                    /*
                    <!-- /////////////////////////////Begin AddPatch CODE///////////////////-->
                    */
                    <td align="left">
                        <input class="inputbox" type="text" name="imageURL" size="80" value="<?php 
        echo $row->imageURL;
        ?>
" />
                        <input class="inputbox" type="button" name="default_patch" value="Set Local Cover Path" onClick="build_patch()" />
                        <script type="text/javascript" language="javascript">
                            function build_patch()
                            {
                                var isbn = document.adminForm.isbn.value;var url = 'components/com_booklibrary/isbn_build.php';
        <?php 
        $cover_path = $booklibrary_configuration['fetchImages']['location'];
        ?>
                                    var cover_path = "<?php 
        echo $cover_path;
        ?>
";
                                    if (window.XMLHttpRequest)
                                    {
                                        // Mozilla, Safari,...
                                        http_request = new XMLHttpRequest();
                                        if (http_request.overrideMimeType)
                                        {http_request.overrideMimeType('text/xml');} }
                                    else if (window.ActiveXObject)
                                    {
                                        // IE
                                        try
                                        {http_request = new ActiveXObject("Msxml2.XMLHTTP");}
                                        catch (e)
                                        { try
                                            {http_request = new ActiveXObject("Microsoft.XMLHTTP");}
                                            catch (e) {} }}
                                    if (!http_request)
                                    { alert('Giving up :( Cannot create an XMLHTTP instance');
                                        return false; }
                                    http_request.onreadystatechange = alertContents;
                                    http_request.open("POST", url, true);
                                    http_request.setRequestHeader('Content-Type' , 'application/x-www-form-urlencoded');
                                    http_request.send('isbn='+isbn+'&cover_path='+cover_path); }

                                function alertContents()
                                { if (http_request.readyState == 4)
                                    { if (http_request.status == 200)
                                        { var resp_text = http_request.responseText;if (resp_text == 1)
                                            { alert("<?php 
        echo _BOOKLIBRARY_TOOLBAR_NEW_BOOK_INCORRECT_FOLDER . " " . $cover_path;
        ?>
");}
                                            if (resp_text == false)
                                            { alert(resp_text + "<?php 
        echo _BOOKLIBRARY_TOOLBAR_NEW_BOOK_INCORRECT_FILE;
        ?>
");}
                                            else { document.adminForm.imageURL.value = resp_text;} }
                                        else { alert('There was a problem with the request.');}
                                    } }
                        </script>
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="right">
                        <strong><?php 
        echo _BOOKLIBRARY_LABEL_PICTURE_URL_UPLOAD;
        ?>
:</strong>
                    </td>
                    <td align="left">
                        <input class="inputbox" type="file" name="picture_file" value="" size="50" maxlength="250" />
                        <br /><?php 
        echo _BOOKLIBRARY_LABEL_PICTURE_URL_DESC;
        ?>
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="right">
                        <strong><?php 
        echo _BOOKLIBRARY_LABEL_URL;
        ?>
:</strong>
                    </td>
                    <td align="left">
                        <input class="inputbox" type="text" name="URL" size="80" value="<?php 
        echo $row->URL;
        ?>
" />
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="right">
                        <strong><?php 
        echo _BOOKLIBRARY_LABEL_BOOKOWNER;
        ?>
:</strong>
                    </td>
                    <td align="left">
        <?php 
        echo $row->owner;
        ?>
(<?php 
        echo $row->owneremail;
        ?>
)
                        <input type="hidden" name="owneremail" size="80" value="<?php 
        echo $row->owneremail;
        ?>
" />
                    </td>
                </tr>


                        <?php 
        //***********************************************************************************************************/
        //**********************************   begin change review   ************************************************/
        //***********************************************************************************************************/
        if ($reviews > false) {
            /* show, if review exist */
            ?>
                    <tr>
                        <td colspan="7">
                            <hr width="100%" size="2" align="left"> <h3><?php 
            echo _BOOKLIBRARY_LABEL_REVIEWS;
            ?>
:</h3>
                        </td>
                    </tr>

                    <table class="adminlist admin22">
                        <tr class="row0">
                            <td width="3%" valign="top" align="center"><div>id</div></td>
                            <td width="2%" valign="top" align="center"><div></div></td>
                            <td width="10%" valign="top" align="center">
                                <strong><?php 
            echo _BOOKLIBRARY_LABEL_REVIEW_TITLE;
            ?>
:</strong>
                            </td>
                            <td width="10%" valign="top" align="center">
                                <strong><?php 
            echo _BOOKLIBRARY_LABEL_LEND_USER;
            ?>
:</strong>
                            </td>
                            <td width="65%" valign="top" align="center">
                                <strong><?php 
            echo _BOOKLIBRARY_LABEL_REVIEW_COMMENT;
            ?>
:</strong>
                            </td>
                            <td width="5%" valign="top" align="center">
                                <strong><?php 
            echo _BOOKLIBRARY_LABEL_PUB_DATE;
            ?>
:</strong>
                            </td>
                            <td width="5%" valign="top" align="center">
                                <strong><?php 
            echo _BOOKLIBRARY_LABEL_REVIEW_RATING;
            ?>
:</strong>
                            </td>
                        </tr>

                <?php 
            for ($i = 0, $nn = 1; $i < count($reviews); $i++, $nn++) {
                ?>
                            <tr class="row0">
                                <td valign="top" align="center">
                                    <div><?php 
                echo $nn;
                ?>
</div>
                                </td>
                                <td valign="top" align="center">
                                    <div>
                                <?php 
                echo "<input type='radio' id='cb" . $i . "' name='bid[]' value='" . $row->id . "," . $reviews[$i]->id . "' onclick='Joomla.isChecked(this.checked);' />";
                ?>
                                    </div>
                                </td>
                                <td valign="top" align="center">
                                    <div><?php 
                print_r($reviews[$i]->title);
                ?>
</div>
                                </td>
                                <td valign="top" align="left">
                                    <div><?php 
                print_r($reviews[$i]->name);
                ?>
</div>
                                </td>
                                <td valign="top" align="left">
                                    <div><?php 
                print_r($reviews[$i]->comment);
                ?>
</div>
                                </td>
                                <td valign="top" align="left">
                                    <div><?php 
                print_r($reviews[$i]->date);
                ?>
</div>
                                </td>
                                <td valign="top" align="left">
                                    <div><img src="../components/com_booklibrary/images/rating-<?php 
                echo $reviews[$i]->rating;
                ?>
.gif" alt="<?php 
                echo $reviews[$i]->rating / 2;
                ?>
" border="0" align="right"/>&nbsp;</div>
                                </td>
                            </tr>
            <?php 
            }
            /* end for(...) */
            ?>
                    </table>
                    <?php 
        }
        /* end if(...) */
        ?>
            </table>

            <input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
            <input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
            <input type="hidden" name="boxchecked" value="0" />
            <input type="hidden" name="task" value="" />
        </form>
        <?php 
        //***********************************************************************************************************/
        //**********************************   end change review   **************************************************/
        //***********************************************************************************************************/
    }
コード例 #5
0
ファイル: admin.modules.html.php プロジェクト: cwcw/cms
    /**
     * Writes the edit form for new and existing module
     *
     * A new record is defined when <var>$row</var> is passed with the <var>id</var>
     * property set to 0.
     * @param mosCategory The category object
     * @param array <p>The modules of the left side.  The array elements are in the form
     * <var>$leftorder[<i>order</i>] = <i>label</i></var>
     * where <i>order</i> is the module order from the db table and <i>label</i> is a
     * text label associciated with the order.</p>
     * @param array See notes for leftorder
     * @param array An array of select lists
     * @param object Parameters
     */
    function editModule(&$row, &$orders2, &$lists, &$params, $option)
    {
        global $mosConfig_live_site;
        global $adminLanguage;
        $tabs = new mosTabs(0);
        ?>
		<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
	   
		<script language="javascript" type="text/javascript">
		function submitbutton(pressbutton) {
			if ( ( pressbutton == 'save' ) && ( document.adminForm.title.value == "" ) ) {
				alert("<?php 
        echo $adminLanguage->A_COMP_MOD_MUST_TITLE;
        ?>
");
			} else {
				<?php 
        if ($row->module == "") {
            getEditorContents('editor1', 'content');
        }
        ?>
				submitform(pressbutton);
			}
			submitform(pressbutton);
		}
		<!--
		var originalOrder = '<?php 
        echo $row->ordering;
        ?>
';
		var originalPos = '<?php 
        echo $row->position;
        ?>
';
		var orders = new Array();	// array in the format [key,value,text]
		<?php 
        $i = 0;
        foreach ($orders2 as $k => $items) {
            foreach ($items as $v) {
                echo "\n\torders[" . $i++ . "] = new Array( \"{$k}\",\"{$v->value}\",\"{$v->text}\" );";
            }
        }
        ?>
		//-->
		</script>
		<table class="adminheading">
		<tr>
			<th class="modules">
			<?php 
        echo $row->id ? 'Edit' : 'New';
        ?>
 
			<?php 
        echo $lists['client_id'] ? $adminLanguage->A_COMP_MAMB_ADMIN : $adminLanguage->A_COMP_MAMB_SITE;
        ?>
			<?php 
        echo $adminLanguage->A_COMP_MOD_MODULE;
        ?>
 ->
			<?php 
        echo $row->title;
        ?>
			</th>
		</tr>
		</table>
	
		<form action="index2.php" method="post" name="adminForm">
	
		<table cellspacing="0" cellpadding="0" width="100%">
		<tr valign="top">
			<td width="60%" valign="top">
				<table class="adminform">
					<tr>
						<th colspan="2">
						<?php 
        echo $adminLanguage->A_COMP_MOD_DETAILS;
        ?>
						</th>
					<tr>
					<tr>
						<td width="100" align="left">
						<?php 
        echo $adminLanguage->A_COMP_TITLE;
        ?>
:
						</td>
						<td>
						<input class="text_area" type="text" name="title" size="35" value="<?php 
        echo $row->title;
        ?>
" />
						</td>
	
					</tr>
					<!-- START selectable pages -->
					<tr>
						<td width="100" align="left">
						<?php 
        echo $adminLanguage->A_COMP_MOD_SHOW_TITLE;
        ?>
:
						</td>
						<td>
						<?php 
        echo $lists['showtitle'];
        ?>
						</td>
					</tr>
					<tr>
						<td valign="top" align="left">
						<?php 
        echo $adminLanguage->A_COMP_MOD_POSITION;
        ?>
:
						</td>
						<td>
						<?php 
        echo $lists['position'];
        ?>
						</td>
					</tr>
					<tr>
						<td valign="top" align="left">
						<?php 
        echo $adminLanguage->A_COMP_MOD_ORDER;
        ?>
:
						</td>
						<td>
						<script language="javascript" type="text/javascript">
						<!--
						writeDynaList( 'class="inputbox" name="ordering" size="1"', orders, originalPos, originalPos, originalOrder );
						//-->
						</script>
						</td>
					</tr>
					<tr>
						<td valign="top" align="left">
						<?php 
        echo $adminLanguage->A_COMP_ACCESS_LEVEL;
        ?>
:
						</td>
						<td>
						<?php 
        echo $lists['access'];
        ?>
						</td>
					</tr>
					<tr>
						<td valign="top">
						<?php 
        echo $adminLanguage->A_COMP_PUBLISHED;
        ?>
:
						</td>
						<td>
						<?php 
        echo $lists['published'];
        ?>
						</td>
					</tr>
					<tr>
						<td colspan="2">
						</td>
					</tr>
					<tr>
						<td valign="top">
						<?php 
        echo $adminLanguage->A_COMP_ID;
        ?>
:
						</td>
						<td>
						<?php 
        echo $row->id;
        ?>
						</td>
					</tr>
					<!-- END selectable pages -->
					<?php 
        if ($row->module == "") {
            ?>
						<tr>
							<td valign="top" align="left">
							<?php 
            echo $adminLanguage->A_COMP_MOD_CONTENT;
            ?>
:
							</td>
							<td>
							<?php 
            // parameters : areaname, content, hidden field, width, height, rows, cols
            editorArea('editor1', $row->content, 'content', '500', '350', '70', '15');
            ?>
							</td>
						</tr>
						<?php 
        }
        ?>
					</table>
				</td>
				<td width="40%">
					<table width="100%">
					<tr>
						<td>
						<?php 
        $tabs->startPane("module");
        $tabs->startTab($adminLanguage->A_COMP_MOD_TAB_LBL, "location-page");
        ?>
						<table width="100%" class="adminform">
						<tr>
							<th>
							<?php 
        echo $adminLanguage->A_COMP_MOD_POSITION;
        ?>
							</th>
						<tr>
						<tr>
							<td>
							<?php 
        echo $adminLanguage->A_COMP_MOD_ITEM_LINK;
        ?>
:
							<br /><br />
							<?php 
        echo $lists['selections'];
        ?>
							</td>
						</tr>
						</table>
						<?php 
        $tabs->endTab();
        $tabs->startTab($adminLanguage->A_COMP_CONT_PARAMETERS, "params-page");
        ?>
						<table class="adminform">
						<tr>
							<th >
							<?php 
        echo $adminLanguage->A_COMP_CONT_PARAMETERS;
        ?>
							</th>
						<tr>
						<tr>
							<td>
							<?php 
        echo $params->render();
        ?>
							</td>
						</tr>
						</table>
						<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>
						</td>
					</tr>
					</table>
				</td>
			</tr>
		</table>
	
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="original" value="<?php 
        echo $row->ordering;
        ?>
" />
		<input type="hidden" name="module" value="<?php 
        echo $row->module;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="client_id" value="<?php 
        echo $lists['client_id'];
        ?>
" />
		<?php 
        if ($row->client_id || $lists['client_id']) {
            echo '<input type="hidden" name="client" value="admin" />';
        }
        ?>
		</form>
		<script language="Javascript" src="<?php 
        echo $mosConfig_live_site;
        ?>
/includes/js/overlib_mini.js"></script>
		<?php 
    }
コード例 #6
0
 function editorArea($areaname, $content, $name, $width, $height, $rows, $cols)
 {
     editorArea($areaname, $content, $name, $width, $height, $rows, $cols);
 }
:</div></td>
      <td width="75%">
		<textarea class="inputbox" name="parameter_label" cols="60" rows="3" ><?php 
    $db->sp("parameter_label");
    ?>
</textarea>
      </td>
    </tr>
    <tr> 
      <td width="25%" nowrap valign="top"><div align="right"><?php 
    echo $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_PARAMETER_FORM_DESCRIPTION');
    ?>
:</div></td>
      <td width="75%" valign="top">
		<?php 
    editorArea('editor1', $db->f("parameter_description"), 'parameter_description', '450', '200', '60', '6');
    ?>
      </td>
    </tr>
    <tr>
      <td><div align="right"><?php 
    echo $VM_LANG->_('PHPSHOP_MODULE_LIST_ORDER');
    ?>
: </div></td>
      <td valign="top"><?php 
    echo $ps_product_type_parameter->list_order_parameter($db->f("product_type_id"), $db->f("parameter_name"), $db->f("parameter_list_order"));
    echo "<input type=\"hidden\" name=\"currentpos\" value=\"" . $db->f("parameter_list_order") . "\" />";
    ?>
      </td>
    </tr>
    <tr>
コード例 #8
0
			<tr class="<?php 
        echo $zoom->_tabclass[$tabcnt];
        ?>
">
				<td valign="top"><?php 
        echo _ZOOM_DESCRIPTION;
        ?>
:&nbsp;</td>
				<td valign="top">
					<!--<textarea class="inputbox" cols="50" rows="5" name="mult_descr[]"><?php 
        echo $zoom->_CONFIG['tempDescr'];
        ?>
</textarea>-->
					<?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('mult_descr[]', $zoom->_CONFIG['tempDescr'], 'mult_descr[]', '100%;', '150', '20', '20');
        ?>
				</td>
			</tr>
			<tr><td style="border-bottom: 1px dashed #CCCCCC;" colspan="2">&nbsp;</td></tr>
			<?php 
        if ($tabcnt == 1) {
            $tabcnt = 0;
        } else {
            $tabcnt++;
        }
    }
    ?>
		<tr><td colspan="2">&nbsp;</td></tr>
		<tr>
			<td colspan="2" align="center">
コード例 #9
0
ファイル: admin.typedcontent.html.php プロジェクト: cwcw/cms
    function edit(&$row, &$images, &$lists, $myid, &$params, $option, &$menus)
    {
        global $mosConfig_live_site, $adminLanguage;
        //mosMakeHtmlSafe( $row );
        $tabs = new mosTabs(0);
        // used to hide "Reset Hits" when hits = 0
        if (!$row->hits) {
            $visibility = "style='display: none; visbility: hidden;'";
        } else {
            $visibility = "";
        }
        ?>

		<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
		<link rel="stylesheet" type="text/css" media="all" href="<?php 
        echo $mosConfig_live_site;
        ?>
/includes/js/calendar/calendar-mos.css" title="green" />
		<!-- import the calendar script -->
		<script type="text/javascript" src="<?php 
        echo $mosConfig_live_site;
        ?>
/includes/js/calendar/calendar.js"></script>
		<!-- import the language module -->
		<script type="text/javascript" src="<?php 
        echo $mosConfig_live_site;
        ?>
/includes/js/calendar/lang/calendar-en.js"></script>
		<script language="javascript" type="text/javascript">
		var folderimages = new Array;
		<?php 
        $i = 0;
        foreach ($images as $k => $items) {
            foreach ($items as $v) {
                echo "\n\tfolderimages[" . $i++ . "] = new Array( '{$k}','" . addslashes($v->value) . "','" . addslashes($v->text) . "' );";
            }
        }
        ?>

		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}

			if ( pressbutton ==' resethits' ) {
				if (confirm('<?php 
        echo $adminLanguage->A_COMP_CONTENT_ZERO;
        ?>
')){
					submitform( pressbutton );
					return;
				} else {
					return;
				}
			}

			if ( pressbutton == 'menulink' ) {
				if ( form.menuselect.value == "" ) {
					alert( "<?php 
        echo $adminLanguage->A_COMP_SECT_SEL_MENU;
        ?>
" );
					return;
				} else if ( form.link_name.value == "" ) {
					alert( "<?php 
        echo $adminLanguage->A_COMP_ENTER_MENU_NAME;
        ?>
" );
					return;
				} else if ( confirm('<?php 
        echo $adminLanguage->A_COMP_TYPED_ARE_YOU;
        ?>
') ){
					submitform( pressbutton );
				} else {
					return;
				}
			}

			var temp = new Array;
			for (var i=0, n=form.imagelist.options.length; i < n; i++) {
				temp[i] = form.imagelist.options[i].value;
			}
			form.images.value = temp.join( '\n' );

			try {
				document.adminForm.onsubmit();
			}
			catch(e){}
			if (trim(form.title.value) == ""){
				alert( "<?php 
        echo $adminLanguage->A_COMP_TEMP;
        ?>
Content item must have a title" );
			} else if (trim(form.name.value) == ""){
				alert( "<?php 
        echo $adminLanguage->A_COMP_TEMP;
        ?>
Content item must have a name" );
			} else {
				if ( form.reset_hits.checked ) {
					form.hits.value = 0;
				} else {
				}
				<?php 
        getEditorContents('editor1', 'introtext');
        ?>
				submitform( pressbutton );
			}
		}

		</script>

		<table class="adminheading">
		<tr>
			<th>
			<?php 
        echo $row->id ? $adminLanguage->A_COMP_EDIT : $adminLanguage->A_COMP_ADD;
        ?>
            <?php 
        echo $adminLanguage->A_COMP_TYPED_CONTENT;
        ?>
			</th>
		</tr>
		</table>

		<form action="index2.php" method="post" name="adminForm">

		<table cellspacing="0" cellpadding="0" border="0" width="100%">
		<tr>
			<td width="60%" valign="top">
				<table class="adminform">
				<tr>
					<th colspan="3">
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_ITEM_DETAILS;
        ?>
					</th>
				<tr>
				<tr>
					<td align="left">
					<?php 
        echo $adminLanguage->A_COMP_TITLE;
        ?>
:
					</td>
					<td>
					<input class="inputbox" type="text" name="title" size="30" maxlength="100" value="<?php 
        echo $row->title;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td align="left">
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_TITLE_ALIAS;
        ?>
:
					</td>
					<td>
					<input class="inputbox" type="text" name="title_alias" size="30" maxlength="100" value="<?php 
        echo $row->title_alias;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td valign="top" align="left" colspan="2">
					<?php 
        echo $adminLanguage->A_COMP_TYPED_TEXT;
        ?>
<br />
					<?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor1', $row->introtext, 'introtext', 500, 400, '65', '50');
        ?>
					</td>
				</tr>
				</table>
			</td>
			<td width="40%" valign="top">
				<?php 
        $tabs->startPane("content-pane");
        $tabs->startTab($adminLanguage->A_COMP_CONT_PUB_TAB, "publish-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo $adminLanguage->A_COMP_CONT_PUBLISHING;
        ?>
					</th>
				<tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo $adminLanguage->A_COMP_STATE;
        ?>
:
					</td>
					<td>
					<?php 
        echo $row->state > 0 ? $adminLanguage->A_COMP_PUBLISHED : $adminLanguage->A_COMP_CONTENT_DRAFT_UNPUB;
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo $adminLanguage->A_COMP_PUBLISHED;
        ?>
:
					</td>
					<td>
					<input type="checkbox" name="published" value="1" <?php 
        echo $row->state ? 'checked="checked"' : '';
        ?>
 />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo $adminLanguage->A_COMP_ACCESS_LEVEL;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['access'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_AUTHOR;
        ?>
:
					</td>
					<td>
					<input type="text" name="created_by_alias" size="30" maxlength="100" value="<?php 
        echo $row->created_by_alias;
        ?>
" class="inputbox" />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_CREATOR;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['created_by'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_OVERRIDE;
        ?>
					</td>
					<td>
					<input class="inputbox" type="text" name="created" id="created" size="25" maxlength="19" value="<?php 
        echo $row->created;
        ?>
" />
					<input name="reset" type="reset" class="button" onClick="return showCalendar('created', 'y-mm-dd');" value="...">
					</td>
				</tr>
				<tr>
					<td width="20%" align="right">
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_START_PUB;
        ?>
:
					</td>
					<td width="80%">
					<input class="inputbox" type="text" name="publish_up" id="publish_up" size="25" maxlength="19" value="<?php 
        echo $row->publish_up;
        ?>
" />
					<input type="reset" class="button" value="..." onclick="return showCalendar('publish_up', 'y-mm-dd');">
					</td>
				</tr>
				<tr>
					<td width="20%" align="right">
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_FINISH_PUB;
        ?>
:
					</td>
					<td width="80%">
					<input class="inputbox" type="text" name="publish_down" id="publish_down" size="25" maxlength="19" value="<?php 
        echo $row->publish_down;
        ?>
" />
					<input type="reset" class="button" value="..." onclick="return showCalendar('publish_down', 'y-mm-dd');">
					</td>
				</tr>
				</table>
				<br />
				<table class="adminform">
				<tr>
					<td width="90px" valign="top" align="right">
					<strong><?php 
        echo $adminLanguage->A_COMP_STATE;
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo $row->state > 0 ? $adminLanguage->A_COMP_PUBLISHED : ($row->state < 0 ? $adminLanguage->A_COMP_ARCHIVED : $adminLanguage->A_COMP_CONTENT_DRAFT_UNPUB);
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo $adminLanguage->A_COMP_HITS;
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo $row->hits;
        ?>
					<div <?php 
        echo $visibility;
        ?>
>
					<input name="reset_hits" type="button" class="button" value="<?php 
        echo $adminLanguage->A_COMP_CONTENT_RESET_HIT;
        ?>
" onClick="submitbutton('resethits');">
					</div>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo $adminLanguage->A_COMP_ADMIN_VERSION;
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo "{$row->version}";
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo $adminLanguage->A_CREATED;
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo $row->created ? $row->created . "</td></tr><tr><td valign='top' align='right'><strong>" . $adminLanguage->A_COMP_CONTENT_BY . "</strong></td><td>" . $row->creator : $adminLanguage->A_COMP_CONTENT_NEW_DOC;
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo $adminLanguage->A_COMP_TEMP;
        ?>
Last Modified</strong>
					</td>
					<td>
					<?php 
        echo $row->modified ? $row->modified . "</td></tr><tr><td valign='top' align='right'><strong>" . $adminLanguage->A_COMP_CONTENT_BY . "</strong></td><td>" . $row->modifier : $adminLanguage->A_COMP_CONTENT_NOT_MOD;
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo $adminLanguage->A_COMP_TYPED_EXPIRES;
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo "{$row->publish_down}";
        ?>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab($adminLanguage->A_COMP_CONT_IMG_TAB, "images-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_MOSIMAGE;
        ?>
					</th>
				<tr>
				<tr>
					<td colspan="6">
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_SUB_FOLDER;
        ?>
: <?php 
        echo $lists['folders'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_GALLERY;
        ?>
					<br />
					<?php 
        echo $lists['imagefiles'];
        ?>
					<br />
					<input class="button" type="button" value="<?php 
        echo $adminLanguage->A_COMP_ADD;
        ?>
" onClick="addSelectedToList('adminForm','imagefiles','imagelist')" />
					</td>
					<td valign="top">
					<img name="view_imagefiles" src="../images/M_images/blank.png" width="100" />
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_IMAGES;
        ?>
:
					<br />
					<?php 
        echo $lists['imagelist'];
        ?>
					<br />
					<input class="button" type="button" value="<?php 
        echo $adminLanguage->A_COMP_CONTENT_UP;
        ?>
up" onClick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,-1)" />
					<input class="button" type="button" value="<?php 
        echo $adminLanguage->A_COMP_CONTENT_DOWN;
        ?>
" onClick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,+1)" />
					<input class="button" type="button" value="<?php 
        echo $adminLanguage->A_COMP_CONTENT_REMOVE;
        ?>
" onClick="delSelectedFromList('adminForm','imagelist')" />
					</td>
					<td valign="top">
					<img name="view_imagelist" src="../images/M_images/blank.png" width="100" />
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_EDIT_IMAGE;
        ?>
:
						<table>
						<tr>
							<td align="right">
							<?php 
        echo $adminLanguage->A_COMP_SOURCE;
        ?>
							</td>
							<td>
							<input type="text" name= "_source" value="" />
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo $adminLanguage->A_COMP_CONTENT_ALIGN;
        ?>
							</td>
							<td>
							<?php 
        echo $lists['_align'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo $adminLanguage->A_COMP_CONTENT_ALT;
        ?>
							</td>
							<td>
							<input type="text" name="_alt" value="" />
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo $adminLanguage->A_COMP_CONTENT_BORDER;
        ?>
							</td>
							<td>
							<input type="text" name="_border" value="" size="3" maxlength="1" />
							</td>
						</tr>
						<tr>
							<td align="right"></td>
							<td>
							<input class="button" type="button" value="<?php 
        echo $adminLanguage->A_COMP_CONTENT_APPLY;
        ?>
" onClick="applyImageProps()" />
							</td>
						</tr>
						</table>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab($adminLanguage->A_COMP_CONT_PARAMETERS, "params-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_PARAM;
        ?>
					</th>
				<tr>
				<tr>
					<td>
					<?php 
        echo $params->render();
        ?>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab($adminLanguage->A_COMP_CONTENT_META_INFO, $adminLanguage->A_COMP_CONF_META_PAGE);
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_META_DATA;
        ?>
					</th>
				<tr>
				<tr>
					<td align="left">
					<?php 
        echo $adminLanguage->A_COMP_DESCRIPTION;
        ?>
:<br />
					<textarea class="inputbox" cols="40" rows="5" name="metadesc" style="width:300px"><?php 
        echo str_replace('&', '&amp;', $row->metadesc);
        ?>
</textarea>
					</td>
				</tr>
				<tr>
					<td align="left">
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_KEYWORDS;
        ?>
:<br />
					<textarea class="inputbox" cols="40" rows="5" name="metakey" style="width:300px"><?php 
        echo str_replace('&', '&amp;', $row->metakey);
        ?>
</textarea>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        if ($row->id) {
            $tabs->startTab($adminLanguage->A_COMP_CONTENT_LINK_TO_MENU, "link-page");
            ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
            echo $adminLanguage->A_COMP_LINK_TO_MENU;
            ?>
					</th>
				<tr>
				<tr>
					<td colspan="2">
					<?php 
            echo $adminLanguage->A_COMP_TYPED_WILL;
            ?>
					<br /><br />
					</td>
				<tr>
				<tr>
					<td valign="top" width="90px">
					<?php 
            echo $adminLanguage->A_COMP_SELECT_MENU;
            ?>
					</td>
					<td>
					<?php 
            echo $lists['menuselect'];
            ?>
					</td>
				<tr>
				<tr>
					<td valign="top" width="90px">
					<?php 
            echo $adminLanguage->A_COMP_MENU_NAME;
            ?>
					</td>
					<td>
					<input type="text" name="link_name" class="inputbox" value="" size="30" />
					</td>
				<tr>
				<tr>
					<td>
					</td>
					<td>
					<input name="menu_link" type="button" class="button" value="<?php 
            echo $adminLanguage->A_COMP_LINK_TO_MENU;
            ?>
" onClick="submitbutton('menulink');" />
					</td>
				<tr>
				<tr>
					<th colspan="2">
					<?php 
            echo $adminLanguage->A_COMP_MENU_LINKS;
            ?>
					</th>
				</tr>
				<?php 
            if ($menus == NULL) {
                ?>
					<tr>
						<td colspan="2">
						<?php 
                echo $adminLanguage->A_COMP_NONE;
                ?>
						</td>
					</tr>
					<?php 
            } else {
                foreach ($menus as $menu) {
                    ?>
						<tr>
							<td colspan="2">
							<hr />
							</td>
						</tr>
						<tr>
							<td width="90px" valign="top">
							<?php 
                    echo $adminLanguage->A_COMP_MENU;
                    ?>
							</td>
							<td>
							<?php 
                    echo $menu->menutype;
                    ?>
							</td>
						</tr>
						<tr>
							<td width="90px" valign="top">
							<?php 
                    echo $adminLanguage->A_COMP_CONTENT_LINK_NAME;
                    ?>
							</td>
							<td>
							<strong>
							<?php 
                    echo $menu->name;
                    ?>
							</strong>
							</td>
						</tr>
						<tr>
							<td width="90px" valign="top">
							<?php 
                    echo $adminLanguage->A_COMP_STATE;
                    ?>
							</td>
							<td>
							<?php 
                    switch ($menu->published) {
                        case -2:
                            echo '<font color="red">' . $adminLanguage->A_COMP_TRASHED . '</font>';
                            break;
                        case 0:
                            echo $adminLanguage->A_COMP_UNPUBLISHED;
                            break;
                        case 1:
                        default:
                            echo '<font color="green">' . $adminLanguage->A_COMP_PUBLISHED . '</font>';
                            break;
                    }
                    ?>
							</td>
						</tr>
						<?php 
                }
            }
            ?>
				<tr>
					<td colspan="2">
					</td>
				</tr>
				</table>
				<?php 
            $tabs->endTab();
        }
        $tabs->endPane();
        ?>
		    </td>
		</tr>
		</table>

		<input type="hidden" name="images" value="" />
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="hits" value="<?php 
        echo $row->hits;
        ?>
" />
		<input type="hidden" name="task" value="" />
		</form>
				<script language="Javascript" src="<?php 
        echo $mosConfig_live_site;
        ?>
/includes/js/overlib_mini.js"></script>
		<?php 
    }
コード例 #10
0
    public static function edit(&$row, &$images, &$lists, &$params, $option, &$menus)
    {
        global $database;
        mosMakeHtmlSafe($row);
        $create_date = null;
        $mod_date = null;
        $nullDate = $database->getNullDate();
        if ($row->created != $nullDate) {
            $create_date = mosFormatDate($row->created, '%A, %d %B %Y %H:%M', '0');
        }
        if ($row->modified != $nullDate) {
            $mod_date = mosFormatDate($row->modified, '%A, %d %B %Y %H:%M', '0');
        }
        $tabs = new mosTabs(1);
        // used to hide "Reset Hits" when hits = 0
        if (!$row->hits) {
            $visibility = "style='display: none; visibility: hidden;'";
        } else {
            $visibility = "";
        }
        mosCommonHTML::loadOverlib();
        mosCommonHTML::loadCalendar();
        ?>
		<script language="javascript" type="text/javascript">
		var folderimages = new Array;
		<?php 
        $i = 0;
        foreach ($images as $k => $items) {
            foreach ($items as $v) {
                echo "folderimages[" . $i++ . "] = new Array( '{$k}','" . addslashes($v->value) . "','" . addslashes($v->text) . "' );\t";
            }
        }
        ?>
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}

			if ( pressbutton ==' resethits' ) {
				if (confirm('Are you sure you want to reset the Hits to Zero? \nAny unsaved changes to this content will be lost.')){
					submitform( pressbutton );
					return;
				} else {
					return;
				}
			}

			if ( pressbutton == 'menulink' ) {
				if ( form.menuselect.value == "" ) {
					alert( "Please select a Menu" );
					return;
				} else if ( form.link_name.value == "" ) {
					alert( "Please enter a Name for this menu item" );
					return;
				}
			}

			var temp = new Array;
			for (var i=0, n=form.imagelist.options.length; i < n; i++) {
				temp[i] = form.imagelist.options[i].value;
			}
			form.images.value = temp.join( '\n' );

			try {
				document.adminForm.onsubmit();
			}
			catch(e){}
			if (trim(form.title.value) == ""){
				alert( "Content item must have a title" );
			} else if (trim(form.name.value) == ""){
				alert( "Content item must have a name" );
			} else {
				if ( form.reset_hits.checked ) {
					form.hits.value = 0;
				} else {
				}
				<?php 
        getEditorContents('editor1', 'introtext');
        ?>
				submitform( pressbutton );
			}
		}
		</script>

		<table class="adminheading">
		<tr>
			<th class="edit">
			Static Content Item:
			<small>
			<?php 
        echo $row->id ? 'Edit' : 'New';
        ?>
			</small>
			</th>
		</tr>
		</table>

		<form action="index2.php" method="post" name="adminForm">

		<table cellspacing="0" cellpadding="0" border="0" width="100%">
		<tr>
			<td width="60%" valign="top">
				<table class="adminform">
				<tr>
					<th colspan="3">
					Item Details
					</th>
				</tr>
				<tr>
					<td align="left">
					Title:
					</td>
					<td>
					<input class="inputbox" type="text" name="title" size="30" maxlength="100" value="<?php 
        echo $row->title;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td align="left">
					Title Alias:
					</td>
					<td>
					<input class="inputbox" type="text" name="title_alias" size="30" maxlength="100" value="<?php 
        echo $row->title_alias;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td valign="top" align="left" colspan="2">
					Text: (required)<br />
					<?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor1', $row->introtext, 'introtext', '100%;', '500', '75', '50');
        ?>
					</td>
				</tr>
				</table>
			</td>
			<td width="40%" valign="top">
				<?php 
        $tabs->startPane("content-pane");
        $tabs->startTab("Publishing", "publish-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					Publishing Info
					</th>
				</tr>
				<tr>
					<td valign="top" align="right" width="120">
					State:
					</td>
					<td>
					<?php 
        echo $row->state > 0 ? 'Published' : 'Draft Unpublished';
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Published:
					</td>
					<td>
					<input type="checkbox" name="published" value="1" <?php 
        echo $row->state ? 'checked="checked"' : '';
        ?>
 />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Access Level:
					</td>
					<td>
					<?php 
        echo $lists['access'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Author Alias:
					</td>
					<td>
					<input type="text" name="created_by_alias" size="30" maxlength="100" value="<?php 
        echo $row->created_by_alias;
        ?>
" class="inputbox" />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Change Creator:
					</td>
					<td>
					<?php 
        echo $lists['created_by'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Override Created Date
					</td>
					<td>
					<input class="inputbox" type="text" name="created" id="created" size="25" maxlength="19" value="<?php 
        echo $row->created;
        ?>
" />
					<input name="reset" type="reset" class="button" onClick="return showCalendar('created', 'y-mm-dd');" value="...">
					</td>
				</tr>
				<tr>
					<td align="right">
					Start Publishing:
					</td>
					<td>
					<input class="inputbox" type="text" name="publish_up" id="publish_up" size="25" maxlength="19" value="<?php 
        echo $row->publish_up;
        ?>
" />
					<input type="reset" class="button" value="..." onclick="return showCalendar('publish_up', 'y-mm-dd');">
					</td>
				</tr>
				<tr>
					<td align="right">
					Finish Publishing:
					</td>
					<td>
					<input class="inputbox" type="text" name="publish_down" id="publish_down" size="25" maxlength="19" value="<?php 
        echo $row->publish_down;
        ?>
" />
					<input type="reset" class="button" value="..." onclick="return showCalendar('publish_down', 'y-mm-dd');">
					</td>
				</tr>
				</table>
				<br />
				<table class="adminform" width="100%">
				<?php 
        if ($row->id) {
            ?>
					<tr>
						<td>
						<strong>Content ID:</strong>
						</td>
						<td>
						<?php 
            echo $row->id;
            ?>
						</td>
					</tr>
					<?php 
        }
        ?>
				<tr>
					<td width="120" valign="top" align="right">
					<strong>State</strong>
					</td>
					<td>
					<?php 
        echo $row->state > 0 ? 'Published' : ($row->state < 0 ? 'Archived' : 'Draft Unpublished');
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong>Hits</strong>
					</td>
					<td>
					<?php 
        echo $row->hits;
        ?>
					<div <?php 
        echo $visibility;
        ?>
>
					<input name="reset_hits" type="button" class="button" value="Reset Hit Count" onClick="submitbutton('resethits');">
					</div>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong>Version</strong>
					</td>
					<td>
					<?php 
        echo $row->version;
        ?>
 times
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong>Created</strong>
					</td>
					<td>
						<?php 
        if (!$create_date) {
            ?>
							New document
							<?php 
        } else {
            echo $create_date;
        }
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong>Last Modified</strong>
					</td>
					<td>
						<?php 
        if (!$mod_date) {
            ?>
							Not modified
							<?php 
        } else {
            echo $mod_date;
            ?>
							<br />
							<?php 
            echo $row->modifier;
        }
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong>Expires</strong>
					</td>
					<td>
					<?php 
        echo "{$row->publish_down}";
        ?>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab("Images", "images-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
						MOSImage Control
					</th>
				</tr>
				<tr>
					<td colspan="2">
						<table width="100%">
						<tr>
							<td width="48%" valign="top">
								<div align="center">
									Gallery Images:
									<br />
									<?php 
        echo $lists['imagefiles'];
        ?>
								</div>
							</td>
							<td width="2%">
								<input class="button" type="button" value=">>" onclick="addSelectedToList('adminForm','imagefiles','imagelist')" title="Add"/>
								<br/>
								<input class="button" type="button" value="<<" onclick="delSelectedFromList('adminForm','imagelist')" title="Remove"/>
							</td>
							<td width="48%">
								<div align="center">
									Content Images:
									<br />
									<?php 
        echo $lists['imagelist'];
        ?>
									<br />
									<input class="button" type="button" value="Up" onclick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,-1)" />
									<input class="button" type="button" value="Down" onclick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,+1)" />
								</div>
							</td>
						</tr>
						</table>
						Sub-folder: <?php 
        echo $lists['folders'];
        ?>
					</td>
				</tr>
				<tr valign="top">
					<td>
						<div align="center">
							Sample Image:<br/>
							<img name="view_imagefiles" src="../images/M_images/blank.png" width="100" />
						</div>
					</td>
					<td valign="top">
						<div align="center">
							Active Image:<br/>
							<img name="view_imagelist" src="../images/M_images/blank.png" width="100" />
						</div>
					</td>
				</tr>
				<tr>
					<td>
					Edit the image selected:
						<table>
						<tr>
							<td align="right">
							Source
							</td>
							<td>
							<input type="text" name= "_source" value="" />
							</td>
						</tr>
						<tr>
							<td align="right">
							Align
							</td>
							<td>
							<?php 
        echo $lists['_align'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							Alt Text
							</td>
							<td>
							<input type="text" name="_alt" value="" />
							</td>
						</tr>
						<tr>
							<td align="right">
							Border
							</td>
							<td>
							<input type="text" name="_border" value="" size="3" maxlength="1" />
							</td>
						</tr>
						<tr>
							<td align="right">
							Caption:
							</td>
							<td>
							<input class="text_area" type="text" name="_caption" value="" size="30" />
							</td>
						</tr>
						<tr>
							<td align="right">
							Caption Position:
							</td>
							<td>
							<?php 
        echo $lists['_caption_position'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							Caption Align:
							</td>
							<td>
							<?php 
        echo $lists['_caption_align'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							Width:
							</td>
							<td>
							<input class="text_area" type="text" name="_width" value="" size="5" maxlength="5" />
							</td>
						</tr>
						<tr>
							<td colspan="2">
							<input class="button" type="button" value="Apply" onClick="applyImageProps()" />
							</td>
						</tr>
						</table>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab("Parameters", "params-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					Parameter Control
					</th>
				</tr>
				<tr>
					<td>
					<?php 
        echo $params->render();
        ?>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab("Meta Info", "metadata-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					Meta Data
					</th>
				</tr>
				<tr>
					<td align="left">
					Description:<br />
					<textarea class="inputbox" cols="40" rows="5" name="metadesc" style="width:300px"><?php 
        echo str_replace('&', '&amp;', $row->metadesc);
        ?>
</textarea>
					</td>
				</tr>
				<tr>
					<td align="left">
					Keywords:<br />
					<textarea class="inputbox" cols="40" rows="5" name="metakey" style="width:300px"><?php 
        echo str_replace('&', '&amp;', $row->metakey);
        ?>
</textarea>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab("Link to Menu", "link-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					Link to Menu
					</th>
				</tr>
				<tr>
					<td colspan="2">
					This will create a 'Link - Static Content' in the menu you select
					<br /><br />
					</td>
				</tr>
				<tr>
					<td valign="top" width="90px">
					Select a Menu
					</td>
					<td>
					<?php 
        echo $lists['menuselect'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" width="90px">
					Menu Item Name
					</td>
					<td>
					<input type="text" name="link_name" class="inputbox" value="" size="30" />
					</td>
				</tr>
				<tr>
					<td>
					</td>
					<td>
					<input name="menu_link" type="button" class="button" value="Link to Menu" onClick="submitbutton('menulink');" />
					</td>
				</tr>
				<tr>
					<th colspan="2">
					Existing Menu Links
					</th>
				</tr>
				<?php 
        if ($menus == NULL) {
            ?>
					<tr>
						<td colspan="2">
						None
						</td>
					</tr>
					<?php 
        } else {
            mosCommonHTML::menuLinksContent($menus);
        }
        ?>
				<tr>
					<td colspan="2">
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>
			</td>
		</tr>
		</table>

		<input type="hidden" name="images" value="" />
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="hits" value="<?php 
        echo $row->hits;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="<?php 
        echo josSpoofValue();
        ?>
" value="1" />
		</form>
		<?php 
    }
コード例 #11
0
echo $db->sf("product_s_desc");
?>
</textarea> 
      				</td>
    			</tr>
  			</table>
  		</td>
  	</tr>
</table>
<div style="font-weight:bold;"><?php 
echo $VM_LANG->_('PHPSHOP_PRODUCT_FORM_DESCRIPTION');
?>
:</div>
      
        <?php 
editorArea('editor1', htmlspecialchars($db->sf("product_desc"), ENT_QUOTES), 'product_desc', '100%', '300', '55', '25');
?>
      
<?php 
$tabs->endTab();
$tabs->startTab($display_label, "display-page");
?>
  <table class="adminform">
    <tr> 
      <td align="left" colspan="2"><?php 
echo "<h2>{$display_label}</h2>";
?>
</td>
    </tr>
    <tr class="row1"> 
      <td width="21%"  style="vertical-align: middle;"><div style="text-align:right;font-weight:bold;"><?php 
コード例 #12
0
    /**
     * Writes the edit form for new and existing categories
     * @param mosCategory The category object
     * @param string
     * @param array
     */
    function edit(&$row, &$lists, $redirect, $menus)
    {
        if ($row->image == "") {
            $row->image = 'blank.png';
        }
        if ($redirect == 'content') {
            $component = 'Conteúdo';
        } else {
            $component = ucfirst(substr($redirect, 4));
            if ($redirect == 'com_contact_details') {
                $component = 'Contato';
            }
        }
        mosMakeHtmlSafe($row, ENT_QUOTES, 'description');
        ?>
		<script language="javascript" type="text/javascript">
		function submitbutton(pressbutton, section) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}

			if ( pressbutton == 'menulink' ) {
				if ( form.menuselect.value == "" ) {
					alert( "Por favor, Selecione um menu" );
					return;
				} else if ( form.link_type.value == "" ) {
					alert( "Por favor, selecione um tipo de menu" );
					return;
				} else if ( form.link_name.value == "" ) {
					alert( "Por favor, informe um nome para este item do menu" );
					return;
				}
			}

			if ( form.name.value == "" ) {
				alert("Categoria deve ter um nome");
			} else if (form.title.value ==""){
				alert("A Categoria deve ter um título");
			} else {
				<?php 
        getEditorContents('editor1', 'description');
        ?>
				submitform(pressbutton);
			}
		}
		</script>

		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th class="categories">
			Categoria:
			<small>
			<?php 
        echo $row->id ? 'Editar' : 'Nova';
        ?>
			</small>
			<small><small>
			[ <?php 
        echo $component;
        ?>
: <?php 
        echo stripslashes($row->name);
        ?>
 ]
			</small></small>
			</th>
		</tr>
		</table>

		<table width="100%">
		<tr>
			<td valign="top" width="60%">
				<table class="adminform">
				<tr>
					<th colspan="3">
					Detalhes da Categoria
					</th>
				<tr>
				<tr>
					<td>
					Título da Categoria:
					</td>
					<td colspan="2">
					<input class="text_area" type="text" name="title" value="<?php 
        echo stripslashes($row->title);
        ?>
" size="50" maxlength="50" title="Um nome abreviado para ser utilizado nos menus" />
					</td>
				</tr>
				<tr>
					<td>
					Nome Categoria:
					</td>
					<td colspan="2">
					<input class="text_area" type="text" name="name" value="<?php 
        echo stripslashes($row->name);
        ?>
" size="50" maxlength="255" title="Um nome longo para ser utilizado nos cabeçalhos" />
					</td>
				</tr>
				<tr>
					<td>
					Seções:
					</td>
					<td colspan="2">
					<?php 
        echo $lists['section'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					Ordenando:
					</td>
					<td colspan="2">
					<?php 
        echo $lists['ordering'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					Imagem:
					</td>
					<td>
					<?php 
        echo $lists['image'];
        ?>
					</td>
					<td rowspan="5" width="50%">
					<script language="javascript" type="text/javascript">
					if (document.forms[0].image.options.value!=''){
					  jsimg='../images/stories/' + getSelectedValue( 'adminForm', 'image' );
					} else {
					  jsimg='../images/M_images/blank.png';
					}
					document.write('<img src=' + jsimg + ' name="imagelib" width="80" height="80" border="2" alt="Preview" />');
					</script>
					</td>
				</tr>
				<tr>
					<td>
					Posição da Imagem:
					</td>
					<td>
					<?php 
        echo $lists['image_position'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					Nível de Acesso:
					</td>
					<td>
					<?php 
        echo $lists['access'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					Publicado:
					</td>
					<td>
					<?php 
        echo $lists['published'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2">
					Descrição:
					</td>
				</tr>
				<tr>
					<td colspan="3">
					<?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor1', $row->description, 'description', '100%;', '300', '60', '20');
        ?>
					</td>
				</tr>
				</table>
			</td>
			<td valign="top" width="40%">
				<?php 
        if ($row->id > 0) {
            ?>
					<table class="adminform">
					<tr>
						<th colspan="2">
						Link to Menu
						</th>
					<tr>
					<tr>
						<td colspan="2">
					Este irá criar um novo item de menu no menu que você selecionou <br />
						<br /><br />
						</td>
					<tr>
					<tr>
						<td valign="top" width="100">
					Selecione um Menu 
						</td>
						<td>
						<?php 
            echo $lists['menuselect'];
            ?>
						</td>
					<tr>
					<tr>
						<td valign="top" width="100">
					Tipo do Menu 
						</td>
						<td>
						<?php 
            echo $lists['link_type'];
            ?>
						</td>
					<tr>
					<tr>
						<td valign="top" width="100">
					Nome do Menu 
						</td>
						<td>
						<input type="text" name="link_name" class="inputbox" value="" size="25" />
						</td>
					<tr>
					<tr>
						<td>
						</td>
						<td>
						<input name="menu_link" type="button" class="button" value="Link to Menu" onClick="submitbutton('menulink');" />
						</td>
					<tr>
					<tr>
						<th colspan="2">
					Links de menus existentes 
						</th>
					</tr>
					<?php 
            if ($menus == NULL) {
                ?>
						<tr>
							<td colspan="2">
							Nenhum
							</td>
						</tr>
						<?php 
            } else {
                mosCommonHTML::menuLinksSecCat($menus);
            }
            ?>
					<tr>
						<td colspan="2">
						</td>
					</tr>
					</table>
					<?php 
        } else {
            ?>
					<table class="adminform" width="40%">
					<tr>
						<th>&nbsp;
						
						</th>
					</tr>
					<tr>
						<td>
						Links de menus dispon&iacute;veis somente depois de salva a categoria
						</td>
					</tr>
					</table>
					<?php 
        }
        // content
        if ($row->section > 0 || $row->section == 'content') {
            ?>
					<br />
					<table class="adminform">
					<tr>
						<th colspan="2">
						Diretórios MOSImage
						</th>
					<tr>
					<tr>
						<td colspan="2">
						<?php 
            echo $lists['folders'];
            ?>
						</td>
					<tr>
					</table>
					<?php 
        }
        ?>
			</td>
		</tr>
		</table>

		<input type="hidden" name="option" value="com_categories" />
		<input type="hidden" name="oldtitle" value="<?php 
        echo $row->title;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="sectionid" value="<?php 
        echo $row->section;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="redirect" value="<?php 
        echo $redirect;
        ?>
" />
		<input type="hidden" name="hidemainmenu" value="0" />
		<input type="hidden" name="<?php 
        echo josSpoofValue();
        ?>
" value="1" />
		</form>
		<?php 
    }
コード例 #13
0
ファイル: caddy.class.php プロジェクト: bizanto/Hooked
    function show()
    {
        jimport('joomla.methods');
        $cfg = $this->getAll();
        JToolBarHelper::title(JText::_('SimpleCaddy Configuration'));
        JToolBarHelper::custom('saveconfig', 'save.png', 'save_f2.png', 'Save', false, false);
        JToolBarHelper::cancel();
        JToolBarHelper::custom('control', 'back.png', 'back.png', 'Main', false, false);
        ?>
		<form method="post" name="adminForm" action="index2.php">
		<?php 
        $currentpage = '';
        $i = 0;
        foreach ($cfg as $conf) {
            if ($currentpage != $conf->pagename) {
                if ($currentpage) {
                    echo "</tbody></table></fieldset>\n";
                }
                echo "<fieldset class='adminform'>";
                $currentpage = $conf->pagename;
                echo "<legend>" . JText::_($currentpage) . "</legend>";
                echo "\n<table class='admintable' cellspacing='1'><tbody>";
                $i++;
            }
            echo "\n<tr><td class='configkey'>" . JText::_($conf->description) . "</td>";
            switch ($conf->type) {
                case "text":
                    echo "<td><input type=\"text\" name=\"edt{$conf->keyword}\" value=\"{$conf->setting}\" size=\"{$conf->sh}\">";
                    echo "</td></tr>\n";
                    break;
                case "textarea":
                    echo "<td><textarea name=\"edt{$conf->keyword}\" cols=\"{$conf->sh}\" rows=\"{$conf->sv}\">{$conf->setting}</textarea>";
                    echo "</td></tr>\n";
                    break;
                case "richtext":
                    echo "<td>";
                    editorArea('editor1', $conf->setting, "edt{$conf->keyword}", '100%', '350', '75', '20');
                    echo "</td></tr>\n";
                    break;
                case "yesno":
                    echo "<td>";
                    echo "<input type='radio' name='edt{$conf->keyword}' " . ($conf->setting == 0 ? " checked='checked'" : "") . " value='0' />" . JText::_('No');
                    echo "<input type='radio' name='edt{$conf->keyword}' " . ($conf->setting == 1 ? " checked='checked'" : "") . " value='1' />" . JText::_('Yes');
                    echo "</td></tr>\n";
                    break;
                case "list":
                    echo "<td>";
                    echo "<select name='edt{$conf->keyword}'>";
                    $txtoptlist = trim($conf->indopts);
                    $pairoptlist = explode("\r\n", $txtoptlist);
                    foreach ($pairoptlist as $k => $value) {
                        $aline = explode(":", trim($value));
                        echo "<option value='" . $aline[1] . "'" . ($conf->setting == $aline[1] ? " selected" : "") . ">" . $aline[0] . "</option>\n";
                    }
                    echo "</select>";
                    echo "</td></tr>\n";
                    break;
            }
            echo "\n";
        }
        ?>
		</td></tr>
		</table>
		<input type="hidden" name="option" value="com_caddy" />
		<input type="hidden" name="action" value="configuration" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="hidemainmenu" value="0" />
		</form>
	<?php 
    }
コード例 #14
0
:</td>
      <td> 
        <input type="text" class="inputbox" name="order_status_name" value="<?php 
$db->sp("order_status_name");
?>
" size="25" />
      </td>
    </tr>
    <tr> 
      <td class="labelcell"><?php 
echo $VM_LANG->_('PHPSHOP_MANUFACTURER_FORM_DESCRIPTION');
?>
:</td>
      <td> 
       	<?php 
editorArea('order_status_description', $db->sf("order_status_description"), 'order_status_description', 500, 250, 75, 25);
?>
      </td>
    </tr>
    <tr> 
      <td class="labelcell"><?php 
echo $VM_LANG->_('PHPSHOP_ORDER_STATUS_FORM_LIST_ORDER');
?>
:</td>
      <td> 
        <input type="text" class="inputbox" name="list_order" value="<?php 
$db->sp("list_order");
?>
" size="3" maxlength="3" />
      </td>
    </tr>
コード例 #15
0
?>
:</td>
          <td width="62%"> 
            <input type="text" class="inputbox" name="product_type_name" size="60" value="<?php 
$db->sp('product_type_name');
?>
" />
          </td>
	</tr>
	<tr> 
        <td class="labelcell"><?php 
echo $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_FORM_DESCRIPTION');
?>
:</td>
        <td width="62%" valign="top"><?php 
editorArea('editor1', $db->f("product_type_description"), 'product_type_description', '300', '100', '60', '6');
?>
            <!--input type="text" class="inputbox" name="product_type_description" size="60" value="<?php 
// $db->sp('product_type_description')
?>
" /-->
  		</td>
	</tr>
	<tr>
      <td class="labelcell"><?php 
echo $VM_LANG->_('PHPSHOP_MODULE_LIST_ORDER');
?>
: </td>
      <td valign="top"><?php 
echo $ps_product_type->list_order($db->f("product_type_id"), $db->f("product_type_list_order"));
echo "<input type=\"hidden\" name=\"currentpos\" value=\"" . $db->f("product_type_list_order") . "\" />";
コード例 #16
0
      <td>
        <input type="text" class="inputbox" name="mf_email" value="<?php 
$db->sp("mf_email");
?>
" size="18" />
      </td>
    </tr>
    <tr> 
      <td align="right" >&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr> 
      <td width="22%" align="right"  valign="top"><?php 
echo $VM_LANG->_('PHPSHOP_MANUFACTURER_FORM_DESCRIPTION');
?>
:</td>
      <td width="78%" ><?php 
editorArea('editor1', $db->f("mf_desc"), 'mf_desc', '300', '150', '70', '25');
?>
      </td>
    <tr align="center"> 
      <td colspan="2" >&nbsp;</td>
    </tr>
</table>
<?php 
// Add necessary hidden fields
$formObj->hiddenField('manufacturer_id', $manufacturer_id);
$funcname = !empty($manufacturer_id) ? "manufacturerupdate" : "manufactureradd";
// Write your form with mixed tags and text fields
// and finally close the form:
$formObj->finishForm($funcname, $modulename . '.manufacturer_list', $option);
コード例 #17
0
    function subscription($listEdit, $lists, $show, $html)
    {
        global $_VERSION;
        $joomAca15 = $_VERSION->RELEASE != '1.0' && class_exists('JFactory') ? true : false;
        if ($joomAca15) {
            $editor =& JFactory::getEditor();
        }
        if ($show['access'] or $show['auto_subscribe']) {
            ?>
	<fieldset class="acajoomcss">
	<table class="acajoomtable" width="100%" cellspacing="1">
		<tbody>
	<?php 
            if ($show['auto_subscribe']) {
                ?>
		<tr>
			<td width="185" class="key">
				<span class="editlinktip">
				<?php 
                $tip = _ACA_INFO_LIST_ACA_AUTO_SUB;
                $title = _ACA_AUTO_ADD_NEW_USERS;
                echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
                ?>
				</span>
			</td>
			<td>
				<?php 
                echo $lists['auto_add'];
                ?>
				<?php 
                if ($listEdit->new_letter == 1) {
                    ?>
				<span style=" color: rgb(255, 0, 0); font-weight: bold;">
				<?php 
                    echo _ACA_INFO_LIST_WARNING;
                    ?>
</span>
				<?php 
                }
                ?>
<br /><br />
			</td>
		</tr>
<?php 
            }
            if (class_exists('auto') && $show['access']) {
                ?>
		<tr>
			<td width="185" class="key">
				<span class="editlinktip">
				<?php 
                $tip = _ACA_INFO_LIST_ACCESS;
                $title = _ACA_LIST_ACCESS;
                echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
                ?>
				</span>
			</td>
			<td>
				<?php 
                echo $lists['gid'];
                ?>
			</td>
		</tr>
<?php 
            }
            ?>
		</tbody>
	</table>
	</fieldset>
<?php 
        }
        if ($GLOBALS[ACA . 'require_confirmation']) {
            ?>
	<fieldset class="acajoomcss">
	<legend><?php 
            echo _ACA_SUB_SETTINGS;
            ?>
</legend>
	<table class="acajoomtable"  width="100%" cellspacing="1">
		<tbody>
		<tr>
			<td width="185" class="key" style="vertical-align: top;">
			<span class="editlinktip">
				<?php 
            $tip = _ACA_INFO_LIST_SUB_MESS;
            $title = _ACA_SUBMESSAGE;
            ?>
				<?php 
            echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
            ?>
				</span><br />
				<strong><?php 
            echo _ACA_USABLE_TAGS;
            ?>
</strong><br />
				<?php 
            echo _ACA_NAME_AND_CONFIRM;
            ?>
			</td>
			<td>
				<?php 
            if ($html) {
                if ($joomAca15) {
                    echo $editor->display('subscribemessage', $listEdit->subscribemessage, '100%', '200', '75', '20');
                } else {
                    editorArea('editor3', $listEdit->subscribemessage, 'subscribemessage', '100%;', '200', '75', '20');
                }
            } else {
                echo '<textarea name="subscribemessage" rows="20" cols="75">' . $listEdit->subscribemessage . '</textarea>';
            }
            ?>
			</td>
		</tr>
		</tbody>
	</table>
	</fieldset>
	<?php 
        }
        if ($show['unsusbcribe']) {
            ?>
	<fieldset class="acajoomcss">
	<legend><span class="editlinktip"><?php 
            echo _ACA_UNSUB_SETTINGS;
            ?>
</span></legend>
	<table class="acajoomtable" width="100%"  cellspacing="1">
		<tbody>
		<tr>
			<td width="185" class="key">
				<span class="editlinktip">
				<?php 
            $tip = _ACA_SEND_UNSUBCRIBE_TIPS;
            $title = _ACA_SEND_UNSUBCRIBE;
            echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
            ?>
				</span>
			</td>
			<td>
				<?php 
            echo $lists['unsubscribesend'];
            ?>
			</td>
		</tr>
		<tr>
			<td width="185" class="key" style="vertical-align: top;">
			<span class="editlinktip">
				<?php 
            $tip = _ACA_INFO_LIST_UNSUB_MESS;
            $title = _ACA_UNSUB_MESSAGE;
            ?>
				<?php 
            echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
            ?>
				</span><br />
				<strong><?php 
            echo _ACA_USABLE_TAGS;
            ?>
</strong><br />
				<?php 
            echo _ACA_NAMEREP;
            ?>
<br />
				<?php 
            echo _ACA_FIRST_NAME_REP;
            ?>
			</td>
			<td>
				<?php 
            if ($html) {
                if ($joomAca15) {
                    echo $editor->display('unsubscribemessage', $listEdit->unsubscribemessage, '100%', '200', '75', '20');
                } else {
                    editorArea('editor4', $listEdit->unsubscribemessage, 'unsubscribemessage', '100%;', '200', '75', '20');
                }
            } else {
                echo '<textarea name="unsubscribemessage" rows="20" cols="75">' . $listEdit->unsubscribemessage . '</textarea>';
            }
            ?>
			</td>
		</tr>
		</tbody>
	</table>
	</fieldset>
	<?php 
        }
        if ($show['email_unsubcribe'] and class_exists('auto')) {
            ?>
	<fieldset class="acajoomcss">
	<table class="acajoomtable" cellspacing="1">
		<tbody>
		<tr>
			<td width="185" class="key">
				<span class="editlinktip">
				<?php 
            $tip = _ACA_LIST_SHOW_UNSUBCRIBE_TIPS;
            $title = _ACA_LIST_SHOW_UNSUBCRIBE;
            echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
            ?>
				</span>
			</td>
			<td>
				<?php 
            echo $lists['footer'];
            ?>
			</td>
		</tr>
		</tbody>
	</table>
	</fieldset>
<?php 
        }
    }
コード例 #18
0
ファイル: admin.categories.html.php プロジェクト: cwcw/cms
    /**
     * Writes the edit form for new and existing categories
     * @param mosCategory The category object
     * @param string
     * @param array
     */
    function edit(&$row, $section, &$lists, $redirect, $menus)
    {
        global $mosConfig_live_site, $adminLanguage;
        if ($row->image == "") {
            $row->image = 'blank.png';
        }
        mosMakeHtmlSafe($row, ENT_QUOTES, 'description');
        ?>
		<script language="javascript" type="text/javascript">
		function submitbutton(pressbutton, section) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}

			if ( pressbutton == 'menulink' ) {
				if ( form.menuselect.value == "" ) {
					alert( "<?php 
        echo $adminLanguage->A_COMP_SELECT_MENU;
        ?>
" );
					return;
				} else if ( form.link_type.value == "" ) {
					alert( "<?php 
        echo $adminLanguage->A_COMP_SELECT_MENU_TYPE;
        ?>
" );
					return;
				} else if ( form.link_name.value == "" ) {
					alert( "<?php 
        echo $adminLanguage->A_COMP_ENTER_MENU_NAME;
        ?>
" );
					return;
				} else if ( confirm("<?php 
        echo $adminLanguage->A_COMP_CREATE_MENU_LINK;
        ?>
" ) ){
					submitform( pressbutton );
				} else {
					return;
				}
			}

			if ( form.name.value == "" ) {
				alert("<?php 
        echo $adminLanguage->A_COMP_CATEG_MUST_NAME;
        ?>
");
			} else {
				<?php 
        getEditorContents('editor1', 'description');
        ?>
				submitform(pressbutton);
			}
		}
		</script>
	
		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th class="categories">
			<?php 
        echo $row->id ? $adminLanguage->A_COMP_EDIT : $adminLanguage->A_COMP_ADD;
        ?>
 <?php 
        echo $adminLanguage->A_COMP_CATEG;
        ?>
 <?php 
        echo $row->name;
        ?>
			</th>
		</tr>
		</table>

		<table width="100%">
		<tr>
			<td valign="top">
				<table class="adminform">
				<tr>
					<th colspan="3">
                    <?php 
        echo $adminLanguage->A_COMP_CATEG_DETAILS;
        ?>
					</th>
				<tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_CATEG_TITLE;
        ?>
					</td>
					<td colspan="2">
					<input class="text_area" type="text" name="title" value="<?php 
        echo $row->title;
        ?>
" size="50" maxlength="50" title="<?php 
        echo $adminLanguage->A_COMP_SECT_SHORT_NAME;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_CATEG_NAME;
        ?>
:
					</td>
					<td colspan="2">
					<input class="text_area" type="text" name="name" value="<?php 
        echo $row->name;
        ?>
" size="50" maxlength="255" title="<?php 
        echo $adminLanguage->A_COMP_SECT_LONG_NAME;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_SECTION;
        ?>
:
					</td>
					<td colspan="2">
					<?php 
        echo $lists['section'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_IMAGE;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['image'];
        ?>
					</td>
					<td rowspan="4" width="50%">
					<script language="javascript" type="text/javascript">
					if (document.forms[0].image.options.value!=''){
					  jsimg='../images/stories/' + getSelectedValue( 'adminForm', 'image' );
					} else {
					  jsimg='../images/M_images/blank.png';
					}
					document.write('<img src=' + jsimg + ' name="imagelib" width="80" height="80" border="2" alt="Preview" />');
					</script>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_IMAGE_POSITION;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['image_position'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_ORDERING;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['ordering'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_ACCESS_LEVEL;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['access'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_PUBLISHED;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['published'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top">
					<?php 
        echo $adminLanguage->A_COMP_DESCRIPTION;
        ?>
:
					</td>
					<td colspan="2">
					<?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor1', $row->description, 'description', '500', '200', '50', '5');
        ?>
					</td>
				</tr>
				</table>
			</td>
			<td valign="top">
			<?php 
        if ($row->section > 0) {
            ?>
				
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
            echo $adminLanguage->A_COMP_LINK_TO_MENU;
            ?>
					</th>
				<tr>
				<tr>
					<td colspan="2">
					<?php 
            echo $adminLanguage->A_COMP_CREATE_MENU;
            ?>
					<br /><br />
					</td>
				<tr>
				<tr>
					<td valign="top" width="100px">
					<?php 
            echo $adminLanguage->A_COMP_SELECT_MENU;
            ?>
					</td>
					<td>
					<?php 
            echo $lists['menuselect'];
            ?>
					</td>
				<tr>
				<tr>
					<td valign="top" width="100px">
					<?php 
            echo $adminLanguage->A_COMP_MENU_TYPE;
            ?>
					</td>
					<td>
					<?php 
            echo $lists['link_type'];
            ?>
					</td>
				<tr>
				<tr>
					<td valign="top" width="100px">
					<?php 
            echo $adminLanguage->A_COMP_MENU_NAME;
            ?>
					</td>
					<td>
					<input type="text" name="link_name" class="inputbox" value="" size="25" />
					</td>
				<tr>
				<tr>
					<td>
					</td>
					<td>
					<input name="menu_link" type="button" class="button" value="<?php 
            echo $adminLanguage->A_COMP_LINK_TO_MENU;
            ?>
" onClick="submitbutton('menulink');" />
					</td>
				<tr>
				<tr>
					<th colspan="2">
					<?php 
            echo $adminLanguage->A_COMP_MENU_LINKS;
            ?>
					</th>
				</tr>
				<?php 
            if ($menus == NULL) {
                ?>
					<tr>
						<td colspan="2">
						<?php 
                echo $adminLanguage->A_COMP_NONE;
                ?>
						</td>
					</tr>
					<?php 
            } else {
                foreach ($menus as $menu) {
                    ?>
						<tr>
							<td colspan="2">
							<hr/>
							</td>
						</tr>
						<tr>
							<td width="90px" valign="top" align="right">
							<strong>
							<?php 
                    echo $adminLanguage->A_COMP_MENU;
                    ?>
							</strong>
							</td>
							<td>
							<?php 
                    echo $menu->menutype;
                    ?>
  
							</td>
						</tr>
						<tr>
							<td width="90px" valign="top" align="right">
							<strong>
							<?php 
                    echo $adminLanguage->A_COMP_TYPE;
                    ?>
							</strong>
							</td>
							<td>
							<?php 
                    echo $menu->type;
                    ?>
  
							</td>
						</tr>
						<tr>
							<td width="90px" valign="top" align="right">
							<strong>
							<?php 
                    echo $adminLanguage->A_COMP_ITEM_NAME;
                    ?>
							</strong>
							</td>
							<td>
							<strong>
							<?php 
                    echo $menu->name;
                    ?>
  
							</strong>
							</td>
						</tr>
						<tr>
							<td width="90px" valign="top" align="right">
							<strong>
							<?php 
                    echo $adminLanguage->A_COMP_STATE;
                    ?>
							</strong>
							</td>
							<td>
							<?php 
                    switch ($menu->published) {
                        case -2:
                            echo "<font color=\"red\">" . $adminLanguage->A_COMP_TRASHED . "</font>";
                            break;
                        case 0:
                            echo $adminLanguage->A_COMP_UNPUBLISHED;
                            break;
                        case 1:
                        default:
                            echo "<font color=\"green\">" . $adminLanguage->A_COMP_PUBLISHED . "</font>";
                            break;
                    }
                    ?>
							</td>
						</tr>
						<?php 
                }
            }
            ?>
				<tr>
					<td colspan="2">
					</td>
				</tr>
				</table>
				<?php 
        }
        ?>
			</td>
		</tr>
		</table>

		<input type="hidden" name="option" value="com_categories" />
		<input type="hidden" name="oldtitle" value="<?php 
        echo $row->title;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="sectionid" value="<?php 
        echo $row->section;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="redirect" value="<?php 
        echo $redirect;
        ?>
" />
		</form>
		<?php 
    }
コード例 #19
0
			<input type="text" name="scan_keywords" size="40" value="" class="inputbox" />
		</td>
	</tr>
	<tr>
		<td valign="top"><?php 
    echo _ZOOM_DESCRIPTION;
    ?>
:&nbsp;</td>
		<td colspan="2">
			<!--<textarea class="inputbox" cols="50" rows="5" name="scan_descr"><?php 
    echo $zoom->_CONFIG['tempDescr'];
    ?>
</textarea>-->
			<?php 
    // parameters : areaname, content, hidden field, width, height, rows, cols
    editorArea('scan_descr', $zoom->_CONFIG['tempDescr'], 'scan_descr', '100%;', '150', '20', '20');
    ?>
		</td>
	</tr>
	<tr>
		<td colspan="3" align="center">
			<input type="submit" value="<?php 
    echo _ZOOM_BUTTON_UPLOAD;
    ?>
" name="submit_url" class="button" />
		</td>
	</tr>
	</table>
	</form>
	<?php 
}
コード例 #20
0
    function edit(&$row, &$images, &$lists, &$params, $option, &$menus)
    {
        global $mosConfig_live_site;
        //mosMakeHtmlSafe( $row );
        $tabs = new mosTabs(1);
        // used to hide "Reset Hits" when hits = 0
        if (!$row->hits) {
            $visibility = "style='display: none; visbility: hidden;'";
        } else {
            $visibility = "";
        }
        mosCommonHTML::loadOverlib();
        mosCommonHTML::loadCalendar();
        ?>
		<script language="javascript" type="text/javascript">
		var folderimages = new Array;
		<?php 
        $i = 0;
        foreach ($images as $k => $items) {
            foreach ($items as $v) {
                echo "\n\tfolderimages[" . $i++ . "] = new Array( '{$k}','" . addslashes($v->value) . "','" . addslashes($v->text) . "' );";
            }
        }
        ?>
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}

			if ( pressbutton ==' resethits' ) {
				if (confirm('<?php 
        echo T_('Are you sure you want to reset the Hits to Zero? \\nAny unsaved changes to this content will be lost.');
        ?>
')){
					submitform( pressbutton );
					return;
				} else {
					return;
				}
			}

			if ( pressbutton == 'menulink' ) {
				if ( form.menuselect.value == "" ) {
					alert( "<?php 
        echo T_('Please select a Menu');
        ?>
" );
					return;
				} else if ( form.link_name.value == "" ) {
					alert( "<?php 
        echo T_('Please enter a Name for this menu item');
        ?>
" );
					return;
				}
			}

			var temp = new Array;
			for (var i=0, n=form.imagelist.options.length; i < n; i++) {
				temp[i] = form.imagelist.options[i].value;
			}
			form.images.value = temp.join( '\n' );

			try {
				document.adminForm.onsubmit();
			}
			catch(e){}
			if (trim(form.title.value) == ""){
				alert( "<?php 
        echo T_('Content item must have a title');
        ?>
" );
			} else if (trim(form.name.value) == ""){
				alert( "<?php 
        echo T_('Content item must have a name');
        ?>
" );
			} else {
				if ( form.reset_hits.checked ) {
					form.hits.value = 0;
				} else {
				}
				<?php 
        getEditorContents('editor1', 'introtext');
        ?>
				submitform( pressbutton );
			}
		}
		
			// show / hide publishing information
			function displayParameterInfo()
			{
				
				if(document.getElementById('simpleediting').style.display == 'block')
				{
					document.getElementById('simpleediting').style.display = 'none';	
					document.getElementById('show').style.display = 'block';	
					document.getElementById('hide').style.display = 'none';
					document.adminForm.simple_editing.value ='on';
				}
				else
				{
					document.getElementById('simpleediting').style.display = 'block';
					document.getElementById('show').style.display = 'none';	
					document.getElementById('hide').style.display = 'block';
					document.adminForm.simple_editing.value ='off';
				}
				
			}
		</script>
		<?php 
        if ($_SESSION['simple_editing'] == 'on') {
            $simpleediting = 'none';
            $simple = 'block';
            $advanced = 'none';
        } else {
            $advanced = 'block';
            $simple = 'none';
            $simpleediting = 'block';
        }
        ?>
		<table class="adminheading">
		<tr>
			<th class="edit">
			<?php 
        echo T_('Static Content Item:');
        ?>
			<small>
			<?php 
        echo $row->id ? T_('Edit') : T_('New');
        ?>
			</small>
			</th>
		</tr>
		</table>
		<table width="100%">
			<tr>
				<td valign="top" align="right">
				<div id = "show" style="display:<?php 
        echo $simple;
        ?>
">
				<a href="javascript:displayParameterInfo();"><?php 
        echo T_('Show Advanced Details');
        ?>
</a>
				</div>
				<div id = "hide" style="display:<?php 
        echo $advanced;
        ?>
">
				<a href="javascript:displayParameterInfo();"><?php 
        echo T_('Hide Advanced Details');
        ?>
</a>
				</div>
				</td>
			</tr>
		</table>
		<form action="index2.php" method="post" name="adminForm">
		<input type ="hidden" name="simple_editing" value=''>
		
		<table cellspacing="0" cellpadding="0" border="0" width="100%">
		<tr>
			<td valign="top">
				<table class="adminform">
				<tr>
					<th colspan="3">
					<?php 
        echo T_('Item Details');
        ?>
					</th>
				<tr>
				<tr>
					<td align="left">
					<?php 
        echo T_('Title:');
        ?>
					</td>
					<td>
					<input class="inputbox" type="text" name="title" size="30" maxlength="100" value="<?php 
        echo $row->title;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td align="left">
					<?php 
        echo T_('Title Alias:');
        ?>
					</td>
					<td>
					<input class="inputbox" type="text" name="title_alias" size="30" maxlength="100" value="<?php 
        echo $row->title_alias;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td valign="top" align="left" colspan="2">
					<?php 
        echo T_('Text: (required)');
        ?>
<br />
					<?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor1', $row->introtext, 'introtext', '100%;', '400', '65', '50');
        ?>
					</td>
				</tr>
				</table>
			</td>
			
			<td valign="top" align="right">
			<div id="simpleediting" style="display:<?php 
        echo $simpleediting;
        ?>
">
			<table width="100%" >
				<tr>
					<td width="200">
			
						<table width="400">
						<tr>
							<td >
				<?php 
        $tabs->startPane("content-pane");
        $tabs->startTab(T_("Publishing"), "publish-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo T_('Publishing Info');
        ?>
					</th>
				<tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo T_('State:');
        ?>
					</td>
					<td>
					<?php 
        echo $row->state > 0 ? 'Published' : 'Draft Unpublished';
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo T_('Published:');
        ?>
					</td>
					<td>
					<input type="checkbox" name="published" value="1" <?php 
        echo $row->state ? 'checked="checked"' : '';
        ?>
 />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo T_('Show on Frontpage:');
        ?>
					</td>
					<td>
					<input type="checkbox" name="frontpage" value="1" <?php 
        echo $row->frontpage ? 'checked="checked"' : '';
        ?>
 />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo T_('Access Level:');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['access'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo T_('Author Alias:');
        ?>
					</td>
					<td>
					<input type="text" name="created_by_alias" size="30" maxlength="100" value="<?php 
        echo $row->created_by_alias;
        ?>
" class="inputbox" />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo T_('Change Creator:');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['created_by'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<?php 
        echo T_('Override Created Date');
        ?>
					</td>
					<td>
					<input class="inputbox" type="text" name="created" id="created" size="25" maxlength="19" value="<?php 
        echo $row->created;
        ?>
" />
					<input name="reset" type="reset" class="button" onClick="return showCalendar('created', 'y-mm-dd');" value="...">
					</td>
				</tr>
				<tr>
					<td width="20%" align="right">
					<?php 
        echo T_('Start Publishing:');
        ?>
					</td>
					<td width="80%">
					<input class="inputbox" type="text" name="publish_up" id="publish_up" size="25" maxlength="19" value="<?php 
        echo $row->publish_up;
        ?>
" />
					<input type="reset" class="button" value="..." onclick="return showCalendar('publish_up', 'y-mm-dd');">
					</td>
				</tr>
				<tr>
					<td width="20%" align="right">
					<?php 
        echo T_('Finish Publishing:');
        ?>
					</td>
					<td width="80%">
					<input class="inputbox" type="text" name="publish_down" id="publish_down" size="25" maxlength="19" value="<?php 
        echo $row->publish_down;
        ?>
" />
					<input type="reset" class="button" value="..." onclick="return showCalendar('publish_down', 'y-mm-dd');">
					</td>
				</tr>
				</table>
				<br />
				<table class="adminform">
				<?php 
        if ($row->id) {
            ?>
					<tr>
						<td>
						<strong><?php 
            echo T_('Content ID:');
            ?>
</strong>
						</td>
						<td>
						<?php 
            echo $row->id;
            ?>
						</td>
					</tr>
					<?php 
        }
        ?>
				<tr>
					<td width="90px" valign="top" align="right">
					<strong><?php 
        echo T_('State:');
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo $row->state > 0 ? T_('Published') : ($row->state < 0 ? T_('Archived') : T_('Draft Unpublished'));
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo T_('Hits');
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo $row->hits;
        ?>
					<div <?php 
        echo $visibility;
        ?>
>
					<input name="reset_hits" type="button" class="button" value="<?php 
        echo T_('Reset Hit Count');
        ?>
" onClick="submitbutton('resethits');">
					</div>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo T_('Version');
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo "{$row->version}";
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo T_('Created');
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo $row->created ? "{$row->created}</td></tr><tr><td valign='top' align='right'><strong>" . T_('By') . "</strong></td><td>{$row->creator}" : T_("New document");
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo T_('Last Modified');
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo $row->modified ? "{$row->modified}</td></tr><tr><td valign='top' align='right'><strong>" . T_('By') . "</strong></td><td>{$row->modifier}" : T_("Not modified");
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong><?php 
        echo T_('Expires');
        ?>
</strong>
					</td>
					<td>
					<?php 
        echo "{$row->publish_down}";
        ?>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Images"), "images-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo T_('MOSImage Control');
        ?>
					</th>
				<tr>
				<tr>
					<td colspan="6">
					<?php 
        echo T_('Sub-folder:');
        ?>
 <?php 
        echo $lists['folders'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Gallery Images');
        ?>
					<br />
					<?php 
        echo $lists['imagefiles'];
        ?>
					<br />
					<input class="button" type="button" value="<?php 
        echo T_('Add');
        ?>
" onClick="addSelectedToList('adminForm','imagefiles','imagelist')" />
					</td>
					<td valign="top">
					<img name="view_imagefiles" src="../images/M_images/blank.png" width="100" />
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Content Images:');
        ?>
					<br />
					<?php 
        echo $lists['imagelist'];
        ?>
					<br />
					<input class="button" type="button" value="<?php 
        echo T_('up');
        ?>
" onClick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,-1)" />
					<input class="button" type="button" value="<?php 
        echo T_('down');
        ?>
" onClick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,+1)" />
					<input class="button" type="button" value="<?php 
        echo T_('remove');
        ?>
" onClick="delSelectedFromList('adminForm','imagelist')" />
					</td>
					<td valign="top">
					<img name="view_imagelist" src="../images/M_images/blank.png" width="100" />
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Edit the image selected:');
        ?>
						<table>
						<tr>
							<td align="right">
							<?php 
        echo T_('Source');
        ?>
							</td>
							<td>
							<input type="text" name= "_source" value="" />
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo T_('Align');
        ?>
							</td>
							<td>
							<?php 
        echo $lists['_align'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo T_('Alt Text');
        ?>
							</td>
							<td>
							<input type="text" name="_alt" value="" />
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo T_('Border');
        ?>
							</td>
							<td>
							<input type="text" name="_border" value="" size="3" maxlength="1" />
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo T_('Caption:');
        ?>
							</td>
							<td>
							<input class="text_area" type="text" name="_caption" value="" size="30" />
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo T_('Caption Position:');
        ?>
							</td>
							<td>
							<?php 
        echo $lists['_caption_position'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo T_('Caption Align:');
        ?>
							</td>
							<td>
							<?php 
        echo $lists['_caption_align'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							<?php 
        echo T_('Width:');
        ?>
							</td>
							<td>
							<input class="text_area" type="text" name="_width" value="" size="5" maxlength="5" />
							</td>
						</tr>
						<tr>
							<td colspan="2">
							<input class="button" type="button" value="<?php 
        echo T_('Apply');
        ?>
" onClick="applyImageProps()" />
							</td>
						</tr>
						</table>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Parameters"), "params-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo T_('Parameter Control');
        ?>
					</th>
				<tr>
				<tr>
					<td>
					<?php 
        echo $params->render();
        ?>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Meta Info"), "metadata-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo T_('Meta Data');
        ?>
					</th>
				<tr>
				<tr>
					<td align="left">
					<?php 
        echo T_('Description:');
        ?>
<br />
					<textarea class="inputbox" cols="40" rows="5" name="metadesc" style="width:300px"><?php 
        echo str_replace('&', '&amp;', $row->metadesc);
        ?>
</textarea>
					</td>
				</tr>
				<tr>
					<td align="left">
					<?php 
        echo T_('Keywords:');
        ?>
<br />
					<textarea class="inputbox" cols="40" rows="5" name="metakey" style="width:300px"><?php 
        echo str_replace('&', '&amp;', $row->metakey);
        ?>
</textarea>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Link to Menu"), "link-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo T_('Link to Menu');
        ?>
					</th>
				<tr>
				<tr>
					<td colspan="2">
					<?php 
        echo T_('This will create a "Link - Static Content" in the menu you select');
        ?>
					<br /><br />
					</td>
				<tr>
				<tr>
					<td valign="top" width="90px">
					<?php 
        echo T_('Select a Menu');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['menuselect'];
        ?>
					</td>
				<tr>
				<tr>
					<td valign="top" width="90px">
					<?php 
        echo T_('Menu Item Name');
        ?>
					</td>
					<td>
					<input type="text" name="link_name" class="inputbox" value="" size="30" />
					</td>
				<tr>
				<tr>
					<td>
					</td>
					<td>
					<input name="menu_link" type="button" class="button" value="<?php 
        echo T_('Link to Menu');
        ?>
" onClick="submitbutton('menulink');" />
					</td>
				<tr>
				<tr>
					<th colspan="2">
					<?php 
        echo T_('Existing Menu Links');
        ?>
					</th>
				</tr>
				<?php 
        if ($menus == NULL) {
            ?>
					<tr>
						<td colspan="2">
						<?php 
            echo T_('None');
            ?>
						</td>
					</tr>
					<?php 
        } else {
            mosCommonHTML::menuLinksContent($menus);
        }
        ?>
				<tr>
					<td colspan="2">
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>
		    	</td>
						</tr>
						
						</table>
					</td>
					</tr>
					</table>
					</div>
					</td>
					
				</tr>
			</table>
			
		</td>
	</tr>
</table>
		<input type="hidden" name="images" value="" />
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="hits" value="<?php 
        echo $row->hits;
        ?>
" />
		<input type="hidden" name="task" value="" />
		</form>
		<?php 
    }
コード例 #21
0
    /**
     * Writes the edit form for new and existing content item
     *
     * A new record is defined when <var>$row</var> is passed with the <var>id</var>
     * property set to 0.
     * @param mosContent The category object
     * @param string The html for the groups select list
     */
    function editContent(&$row, $section, &$lists, &$sectioncategories, &$images, &$params, $option, $redirect, &$menus)
    {
        global $mosConfig_live_site;
        mosMakeHtmlSafe($row);
        $create_date = null;
        if (intval($row->created) != 0) {
            $create_date = mosFormatDate($row->created, '%A, %d %B %Y %H:%M', '0');
        }
        $mod_date = null;
        if (intval($row->modified) != 0) {
            $mod_date = mosFormatDate($row->modified, '%A, %d %B %Y %H:%M', '0');
        }
        $tabs = new mosTabs(1);
        // used to hide "Reset Hits" when hits = 0
        if (!$row->hits) {
            $visibility = "style='display: none; visbility: hidden;'";
        } else {
            $visibility = "";
        }
        mosCommonHTML::loadOverlib();
        mosCommonHTML::loadCalendar();
        ?>
		<script language="javascript" type="text/javascript">
		<!--
		var sectioncategories = new Array;
		<?php 
        $i = 0;
        foreach ($sectioncategories as $k => $items) {
            foreach ($items as $v) {
                echo "sectioncategories[" . $i++ . "] = new Array( '{$k}','" . addslashes($v->value) . "','" . addslashes($v->text) . "' );\n\t\t";
            }
        }
        ?>

		var folderimages = new Array;
		<?php 
        $i = 0;
        foreach ($images as $k => $items) {
            foreach ($items as $v) {
                echo "folderimages[" . $i++ . "] = new Array( '{$k}','" . addslashes($v->value) . "','" . addslashes($v->text) . "' );\n\t\t";
            }
        }
        ?>

		function submitbutton(pressbutton) {
			var form = document.adminForm;

			if ( pressbutton == 'menulink' ) {
				if ( form.menuselect.value == "" ) {
					alert( "<?php 
        echo T_('Please select a Menu');
        ?>
" );
					return;
				} else if ( form.link_name.value == "" ) {
					alert( "<?php 
        echo T_('Please enter a Name for this menu item');
        ?>
" );
					return;
				}
			}

			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}
			// assemble the images back into one field
			var temp = new Array;
			for (var i=0, n=form.imagelist.options.length; i < n; i++) {
				temp[i] = form.imagelist.options[i].value;
			}
			form.images.value = temp.join( '\n' );

			// do field validation
			if (form.title.value == ""){
				alert( "<?php 
        echo T_('Content item must have a title');
        ?>
" );
			} else if (form.sectionid.value == "-1"){
				alert( "<?php 
        echo T_('You must select a Section.');
        ?>
" );
			} else if (form.catid.value == "-1"){
				alert( "<?php 
        echo T_('You must select a Category.');
        ?>
" );
 			} else if (form.catid.value == ""){
 				alert( "<?php 
        echo T_('You must select a Category.');
        ?>
" );
			} else {
				<?php 
        getEditorContents('editor1', 'introtext');
        ?>
				<?php 
        getEditorContents('editor2', 'fulltext');
        ?>
				submitform( pressbutton );
			}
		}
		
			// show / hide publishing information
			function displayParameterInfo()
			{
				
				if(document.getElementById('simpleediting').style.display == 'block')
				{
					document.getElementById('simpleediting').style.display = 'none';	
					document.getElementById('show').style.display = 'block';	
					document.getElementById('hide').style.display = 'none';
					document.adminForm.simple_editing.value ='on';
				}
				else
				{
					document.getElementById('simpleediting').style.display = 'block';
					document.getElementById('show').style.display = 'none';	
					document.getElementById('hide').style.display = 'block';
					document.adminForm.simple_editing.value ='off';
				}
				
			}
		//-->
		</script>
		
		<?php 
        if ($_SESSION['simple_editing'] == 'on') {
            $simpleediting = 'none';
            $simple = 'block';
            $advanced = 'none';
        } else {
            $advanced = 'block';
            $simple = 'none';
            $simpleediting = 'block';
        }
        ?>
		<form action="index2.php" method="post" name="adminForm">
		<input type ="hidden" name="simple_editing" value='' />
		<table class="adminheading" border="1">
		<tr>
			<th class="edit">
			<?php 
        echo T_('Content Item:');
        ?>
			<small>
			<?php 
        echo $row->id ? T_('Edit') : T_('New');
        ?>
			</small>
			<?php 
        if ($row->id) {
            ?>
				<small><small>
				[ <?php 
            echo T_('Section:');
            ?>
 <?php 
            echo $section;
            ?>
 ]
				</small></small>
				<?php 
        }
        ?>
			
			</th>
		</tr>
		</table>
		<table width="100%">
			<tr>
				<td valign="top" align="right">
				<div id = "show" style="display:<?php 
        echo $simple;
        ?>
">
				<a href="javascript:displayParameterInfo();"><?php 
        echo T_('Show Advanced Details');
        ?>
</a>
				</div>
				<div id = "hide" style="display:<?php 
        echo $advanced;
        ?>
">
				<a href="javascript:displayParameterInfo();"><?php 
        echo T_('Hide Advanced Details');
        ?>
</a>
				</div>
				</td>
			</tr>
		</table>
		<table cellspacing="0" cellpadding="0" width="100%" >
		<tr>
			<td valign="top">
			
				<table width="100%" class="adminform">
				<tr>
					<td width="500">
						<table cellspacing="0" cellpadding="0" border="0" width="100%">
						<tr >
							<th colspan="4">
							<?php 
        echo T_('Item Details');
        ?>
							</th>
						</tr>
						<tr>
							<td>
							<?php 
        echo T_('Title:');
        ?>
							</td>
							<td>
							<input class="text_area" type="text" name="title" size="30" maxlength="100" value="<?php 
        echo $row->title;
        ?>
" />
							</td>
							<td>
							<?php 
        echo T_('Section:');
        ?>
							</td>
							<td>
							<?php 
        echo $lists['sectionid'];
        ?>
							</td>
						</tr>
						<tr>
							<td>
							<?php 
        echo T_('Title Alias:');
        ?>
							</td>
							<td>
							<input name="title_alias" type="text" class="text_area" id="title_alias" value="<?php 
        echo $row->title_alias;
        ?>
" size="30" maxlength="100" />
							</td>
							<td>
							<?php 
        echo T_('Category:');
        ?>
							</td>
							<td>
							<?php 
        echo $lists['catid'];
        ?>
							</td>
						</tr>
						</table>
					</td>
				</tr>
			
				<tr>
					<td width="100%">
					<?php 
        echo T_('Intro Text:');
        ?>
 (<?php 
        echo T_('required');
        ?>
)
					<br /><?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor1', $row->introtext, 'introtext', '100%;', '200', '75', '20');
        ?>
					</td>
				</tr>
				<tr>
					<td width="100%">
					<?php 
        echo T_('Main Text:');
        ?>
 (<?php 
        echo T_('optional');
        ?>
)
					<br /><?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor2', $row->fulltext, 'fulltext', '100%;', '350', '75', '30');
        ?>
					</td>
				</tr>
				</table>
			</td>
			<td valign="top" align="right">
			<div id="simpleediting" style="display:<?php 
        echo $simpleediting;
        ?>
">
			<table width="100%" >
				<tr>
					<td width="200">
			
						<table width="400">
						<tr>
							<td >
							<?php 
        $tabs->startPane("content-pane");
        $tabs->startTab(T_("Publishing"), "publish-page");
        ?>
							<table class="adminform">
							<tr>
								<th colspan="2">
								<?php 
        echo T_('Publishing Info');
        ?>
								</th>
							</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        echo T_('Show on Frontpage:');
        ?>
								</td>
								<td>
								<input type="checkbox" name="frontpage" value="1" <?php 
        echo $row->frontpage ? 'checked="checked"' : '';
        ?>
 />
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        echo T_('Published:');
        ?>
								</td>
								<td>
								<input type="checkbox" name="published" value="1" <?php 
        echo $row->state ? 'checked="checked"' : '';
        ?>
 />
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        echo T_('Access Level:');
        ?>
								</td>
								<td>
								<?php 
        echo $lists['access'];
        ?>
 </td>
								</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        echo T_('Author Alias:');
        ?>
								</td>
								<td>
								<input type="text" name="created_by_alias" size="30" maxlength="100" value="<?php 
        echo $row->created_by_alias;
        ?>
" class="text_area" />
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        // cause Mambo to be extremely slow w/ huge user table, comment out for now echo T_('Change Creator:');
        ?>
								</td>
								<td>
								<?php 
        // cause Mambo to be extremely slow w/ huge user table, comment out for now echo $lists['created_by'];
        ?>
 </td>
							</tr>
							<tr>
								<td valign="top" align="right"><?php 
        echo T_('Ordering:');
        ?>
</td>
								<td>
								<?php 
        echo $lists['ordering'];
        ?>
 </td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        echo T_('Override Created Date');
        ?>
								</td>
								<td>
								<input class="text_area" type="text" name="created" id="created" size="25" maxlength="19" value="<?php 
        echo $row->created;
        ?>
" />
								<input name="reset" type="reset" class="button" onClick="return showCalendar('created', 'y-mm-dd');" value="..." />
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        echo T_('Start Publishing:');
        ?>
								</td>
								<td>
								<input class="text_area" type="text" name="publish_up" id="publish_up" size="25" maxlength="19" value="<?php 
        echo $row->publish_up;
        ?>
" />
								<input type="reset" class="button" value="..." onClick="return showCalendar('publish_up', 'y-mm-dd');" />
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<?php 
        echo T_('Finish Publishing:');
        ?>
								</td>
								<td>
								<input class="text_area" type="text" name="publish_down" id="publish_down" size="25" maxlength="19" value="<?php 
        echo $row->publish_down;
        ?>
" />
								<input type="reset" class="button" value="..." onClick="return showCalendar('publish_down', 'y-mm-dd');" />
								</td>
							</tr>
							</table>
							<br />
							<table class="adminform">
							<?php 
        if ($row->id) {
            ?>
								<tr>
									<td>
									<strong><?php 
            echo T_('Content ID:');
            ?>
</strong>
									</td>
									<td>
									<?php 
            echo $row->id;
            ?>
									</td>
								</tr>
								<?php 
        }
        ?>
							<tr>
								<td width="90px" valign="top" align="right">
								<strong><?php 
        echo T_('State:');
        ?>
</strong>
								</td>
								<td>
								<?php 
        echo $row->state > 0 ? T_('Published') : ($row->state < 0 ? T_('Archived') : T_('Draft Unpublished'));
        ?>
								</td>
							</tr>
							<tr >
								<td valign="top" align="right">
								<strong>
								<?php 
        echo T_('Hits');
        ?>
								</strong>:
								</td>
								<td>
								<?php 
        echo $row->hits;
        ?>
								<div <?php 
        echo $visibility;
        ?>
>
								<input name="reset_hits" type="button" class="button" value="<?php 
        echo T_('Reset Hit Count');
        ?>
" onClick="submitbutton('resethits');" />
								</div>
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<strong>
								<?php 
        echo T_('Revised');
        ?>
								</strong>:
								</td>
								<td>
								<?php 
        echo $row->version;
        ?>
 <?php 
        echo T_('times');
        ?>
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<strong>
								<?php 
        echo T_('Created');
        ?>
								</strong>
								</td>
								<td>
								<?php 
        echo $row->created ? "{$create_date}</td></tr><tr><td valign='top' align='right'><strong>" . T_('By') . "</strong></td><td>{$row->creator}" : "New document";
        ?>
								</td>
							</tr>
							<tr>
								<td valign="top" align="right">
								<strong>
								<?php 
        echo T_('Last Modified');
        ?>
								</strong>
								</td>
								<td>
								<?php 
        echo $row->modified ? "{$mod_date}</td></tr><tr><td valign='top' align='right'><strong>" . T_('By') . "</strong></td><td>{$row->modifier}" : "Not modified";
        ?>
								</td>
							</tr>
							</table>
							<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Images"), "images-page");
        ?>
							<table class="adminform" width="100%">
							<tr>
								<th colspan="2">
								<?php 
        echo T_('MOSImage Control');
        ?>
								</th>
							</tr>
							<tr>
								<td colspan="6"><?php 
        echo T_('Sub-folder:');
        ?>
 <?php 
        echo $lists['folders'];
        ?>
</td>
							</tr>
							<tr>
								<td>
								<?php 
        echo T_('Gallery Images:');
        ?>
								<br />
								<?php 
        echo $lists['imagefiles'];
        ?>
								</td>
								<td valign="top">
								<img name="view_imagefiles" src="../images/M_images/blank.png" width="100" />
								</td>
							</tr>
							<tr>
								<td>
								<input class="button" type="button" value="<?php 
        echo T_('Add');
        ?>
" onClick="addSelectedToList('adminForm','imagefiles','imagelist')" />
								</td>
							</tr>
							<tr>
								<td>
								<?php 
        echo T_('Content Images:');
        ?>
								<br />
								<?php 
        echo $lists['imagelist'];
        ?>
								</td>
								<td valign="top">
								<img name="view_imagelist" src="../images/M_images/blank.png" width="100" />
								</td>
							</tr>
							<tr>
								<td>
								<input class="button" type="button" value="<?php 
        echo T_('up');
        ?>
" onClick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,-1)" />
								<input class="button" type="button" value="<?php 
        echo T_('down');
        ?>
" onClick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,+1)" />
								<input class="button" type="button" value="<?php 
        echo T_('remove');
        ?>
" onClick="delSelectedFromList('adminForm','imagelist')" />
								</td>
							</tr>
							<tr>
								<td colspan="2">
									<?php 
        echo T_('Edit the image selected:');
        ?>
									<table>
									<tr>
										<td align="right">
										<?php 
        echo T_('Source:');
        ?>
										</td>
										<td>
										<input class="text_area" type="text" name= "_source" value="" />
										</td>
									</tr>
									<tr>
										<td align="right">
										<?php 
        echo T_('Image Align:');
        ?>
										</td>
										<td>
										<?php 
        echo $lists['_align'];
        ?>
										</td>
									</tr>
									<tr>
										<td align="right">
										<?php 
        echo T_('Alt Text:');
        ?>
										</td>
										<td>
										<input class="text_area" type="text" name="_alt" value="" />
										</td>
									</tr>
									<tr>
										<td align="right">
										<?php 
        echo T_('Border:');
        ?>
										</td>
										<td>
										<input class="text_area" type="text" name="_border" value="" size="3" maxlength="1" />
										</td>
									</tr>
									<tr>
										<td align="right">
										<?php 
        echo T_('Caption:');
        ?>
										</td>
										<td>
										<input class="text_area" type="text" name="_caption" value="" size="30" />
										</td>
									</tr>
									<tr>
										<td align="right">
										<?php 
        echo T_('Caption Position:');
        ?>
										</td>
										<td>
										<?php 
        echo $lists['_caption_position'];
        ?>
										</td>
									</tr>
									<tr>
										<td align="right">
										<?php 
        echo T_('Caption Align:');
        ?>
										</td>
										<td>
										<?php 
        echo $lists['_caption_align'];
        ?>
										</td>
									</tr>
									<tr>
										<td align="right">
										<?php 
        echo T_('Width:');
        ?>
										</td>
										<td>
										<input class="text_area" type="text" name="_width" value="" size="5" maxlength="5" />
										</td>
									</tr>
									<tr>
										<td colspan="2">
										<input class="button" type="button" value="<?php 
        echo T_('Apply');
        ?>
" onClick="applyImageProps()" />
										</td>
									</tr>
									</table>
								</td>
							</tr>
							</table>
							<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Parameters"), "params-page");
        ?>
							<table class="adminform">
							<tr>
								<th colspan="2">
								<?php 
        echo T_('Parameter Control');
        ?>
								</th>
							</tr>
							<tr>
								<td>
								* <?php 
        echo T_('These Parameters only control what you see when you click to view an item fully');
        ?>
 *
								<br /><br />
								</td>
							</tr>
							<tr>
								<td>
								<?php 
        echo $params->render();
        ?>
								</td>
							</tr>
							</table>
							<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Meta Info"), "metadata-page");
        ?>
							<table class="adminform">
							<tr>
								<th colspan="2">
								<?php 
        echo T_('Meta Data');
        ?>
								</th>
							</tr>
							<tr>
								<td>
								<?php 
        echo T_('Description:');
        ?>
								<br />
								<textarea class="text_area" cols="30" rows="3" style="width:300px; height:50px" name="metadesc" width="500"><?php 
        echo str_replace('&', '&amp;', $row->metadesc);
        ?>
</textarea>
								</td>
							</tr>
								<tr>
								<td>
								<?php 
        echo T_('Keywords:');
        ?>
								<br />
								<textarea class="text_area" cols="30" rows="3" style="width:300px; height:50px" name="metakey" width="500"><?php 
        echo str_replace('&', '&amp;', $row->metakey);
        ?>
</textarea>
								</td>
							</tr>
							<tr>
								<td>
								<input type="button" class="button" value="<?php 
        echo T_('Add Sect/Cat/Title');
        ?>
" onClick="f=document.adminForm;f.metakey.value=document.adminForm.sectionid.options[document.adminForm.sectionid.selectedIndex].text+', '+getSelectedText('adminForm','catid')+', '+f.title.value+f.metakey.value;" />
								</td>
							</tr>
							</table>
							<?php 
        $tabs->endTab();
        $tabs->startTab(T_("Link to Menu"), "link-page");
        ?>
							<table class="adminform">
							<tr>
								<th colspan="2">
								<?php 
        echo T_('Link to Menu');
        ?>
								</th>
							</tr>
							<tr>
								<td colspan="2">
								<?php 
        echo T_("This will create a 'Link - Content Item' in the menu you select");
        ?>
								<br /><br />
								</td>
							</tr>
							<tr>
								<td valign="top" width="90px">
								<?php 
        echo T_('Select a Menu');
        ?>
								</td>
								<td>
								<?php 
        echo $lists['menuselect'];
        ?>
								</td>
							</tr>
							<tr>
								<td valign="top" width="90px">
								<?php 
        echo T_('Menu Item Name');
        ?>
								</td>
								<td>
								<input type="text" name="link_name" class="inputbox" value="" size="30" />
								</td>
							</tr>
							<tr>
								<td>
								</td>
								<td>
								<input name="menu_link" type="button" class="button" value="<?php 
        echo T_('Link to Menu');
        ?>
" onClick="submitbutton('menulink');" />
								</td>
							</tr>
							<tr>
								<th colspan="2">
								<?php 
        echo T_('Existing Menu Links');
        ?>
								</th>
							</tr>
							<?php 
        if ($menus == NULL) {
            ?>
								<tr>
									<td colspan="2">
									<?php 
            echo T_('None');
            ?>
									</td>
								</tr>
								<?php 
        } else {
            mosCommonHTML::menuLinksContent($menus);
        }
        ?>
							<tr>
								<td colspan="2">
								</td>
							</tr>
							</table>
							<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>
							</td>
						</tr>		
						</table>
					</td>
					</tr>
					</table>
					</div>
					</td>	
				</tr>
			</table>
			<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
			<input type="hidden" name="version" value="<?php 
        echo $row->version;
        ?>
" />
			<input type="hidden" name="mask" value="0" />
			<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
			<input type="hidden" name="redirect" value="<?php 
        echo $redirect;
        ?>
" />
			<input type="hidden" name="task" value="" />
			<input type="hidden" name="images" value="" />
			<input type="hidden" name="hidemainmenu" value="0" />
			</form>
		</td>
	</tr>
</table>
		<?php 
    }
コード例 #22
0
ファイル: admin.content.html.php プロジェクト: cwcw/cms
    /**
     * Writes the edit form for new and existing content item
     *
     * A new record is defined when <var>$row</var> is passed with the <var>id</var>
     * property set to 0.
     * @param mosContent The category object
     * @param string The html for the groups select list
     */
    function editContent(&$row, $section, &$lists, &$sectioncategories, &$images, $myid, &$params, $option, $redirect, &$menus)
    {
        global $mosConfig_live_site, $adminLanguage;
        $sec = $section;
        //used in metadata include
        mosMakeHtmlSafe($row);
        $mod_date = null;
        $create_date = null;
        if (intval($row->modified) != 0) {
            $mod_date = mosFormatDate($row->modified);
        }
        if (intval($row->created) != 0) {
            $create_date = mosFormatDate($row->created);
        }
        $tabs = new mosTabs(0);
        // used to hide "Reset Hits" when hits = 0
        if (!$row->hits) {
            $visibility = "style='display: none; visbility: hidden;'";
        } else {
            $visibility = "";
        }
        ?>
		<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
		<link rel="stylesheet" type="text/css" media="all" href="../includes/js/calendar/calendar-mos.css" title="green" />
		<!-- import the calendar script -->
		<script type="text/javascript" src="../includes/js/calendar/calendar.js"></script>
		<!-- import the language module -->
		<script type="text/javascript" src="../includes/js/calendar/lang/calendar-en.js"></script>
		<script language="javascript" type="text/javascript">

		var sectioncategories = new Array;
		<?php 
        $i = 0;
        foreach ($sectioncategories as $k => $items) {
            foreach ($items as $v) {
                echo "sectioncategories[" . $i++ . "] = new Array( '{$k}','" . addslashes($v->value) . "','" . addslashes($v->text) . "' );\n\t\t";
            }
        }
        ?>


		var folderimages = new Array;
		<?php 
        $i = 0;
        foreach ($images as $k => $items) {
            foreach ($items as $v) {
                echo "folderimages[" . $i++ . "] = new Array( '{$k}','" . addslashes($v->value) . "','" . addslashes($v->text) . "' );\n\t\t";
            }
        }
        ?>


		function submitbutton(pressbutton) {
			var form = document.adminForm;

			if (pressbutton =='resethits') {
				if (confirm("<?php 
        echo $adminLanguage->A_COMP_CONTENT_ZERO;
        ?>
")){
					submitform( pressbutton );
					return;
				} else {
					return;
				}
			}

			if ( pressbutton == 'menulink' ) {
				if ( form.menuselect.value == "" ) {
					alert( "<?php 
        echo $adminLanguage->A_COMP_SELECT_MENU;
        ?>
" );
					return;
				} else if ( form.link_name.value == "" ) {
					alert( "<?php 
        echo $adminLanguage->A_COMP_ENTER_MENU_NAME;
        ?>
" );
					return;
				} else if ( confirm("<?php 
        echo $adminLanguage->A_COMP_CREATE_MENU_LINK;
        ?>
") ){
					submitform( pressbutton );
				} else {
					return;
				}
			}

			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}
			// assemble the images back into one field
			var temp = new Array;
			for (var i=0, n=form.imagelist.options.length; i < n; i++) {
				temp[i] = form.imagelist.options[i].value;
			}
			form.images.value = temp.join( '\n' );

			// do field validation
			if (form.title.value == ""){
				alert( "<?php 
        echo $adminLanguage->A_COMP_CONTENT_MUST_TITLE;
        ?>
" );
			} else if (form.sectionid.value == "-1"){
				alert( "<?php 
        echo $adminLanguage->A_COMP_CONTENT_MUST_SECTION;
        ?>
" );
			} else if (form.catid.value == "-1"){
				alert( "<?php 
        echo $adminLanguage->A_COMP_CONTENT_MUST_CATEG;
        ?>
" );
			} else {
				<?php 
        getEditorContents('editor1', 'introtext');
        getEditorContents('editor2', 'fulltext');
        ?>
				submitform( pressbutton );
			}
		}
		</script>

		<form action="index2.php" method="post" name="adminForm">
		<input type="hidden" name="images" value="" />
		<table class="adminheading">
		<tr>
			<th class="edit">
			<?php 
        echo $row->id ? $adminLanguage->A_COMP_EDITING : $adminLanguage->A_COMP_ADDING;
        ?>
 <?php 
        echo $adminLanguage->A_COMP_CONTENT_IN;
        ?>
 <?php 
        echo $section;
        ?>
 <?php 
        echo $adminLanguage->A_COMP_SECTION;
        ?>
			</th>
		</tr>
		</table>

		<table cellspacing="0" cellpadding="0" width="100%">
		<tr>
			<td width="60%" valign="top">
				<table width="100%" class="adminform">
				<tr>
					<td width="100%">
						<table cellspacing="0" cellpadding="0" border="0" width="100%">
						<tr>
							<th colspan="4">
							<?php 
        echo $adminLanguage->A_COMP_CONTENT_ITEM_DETAILS;
        ?>
							</th>
						<tr>
						<tr>
							<td>
							<?php 
        echo $adminLanguage->A_COMP_TITLE;
        ?>
:
							</td>
							<td>
							<input class="text_area" type="text" name="title" size="30" maxlength="100" value="<?php 
        echo $row->title;
        ?>
" />
							</td>
							<td>
							<?php 
        echo $adminLanguage->A_COMP_SECTION;
        ?>
:
							</td>
							<td>
							<?php 
        echo $lists['sectionid'];
        ?>
							</td>
						</tr>
						<tr>
							<td>
							<?php 
        echo $adminLanguage->A_COMP_CONTENT_TITLE_ALIAS;
        ?>
:
							</td>
							<td>
							<input name="title_alias" type="text" class="text_area" id="title_alias" value="<?php 
        echo $row->title_alias;
        ?>
" size="30" maxlength="100" />
							</td>
							<td>
							<?php 
        echo $adminLanguage->A_COMP_CATEG;
        ?>
:
							</td>
							<td>
							<?php 
        echo $lists['catid'];
        ?>
							</td>
						</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td width="100%">
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_INTRO;
        ?>
					<br /><?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor1', $row->introtext, 'introtext', 500, 200, '50', '15');
        ?>
					</td>
				</tr>
				<tr>
					<td width="100%">
					<?php 
        echo $adminLanguage->A_COMP_CONTENT_MAIN;
        ?>
					<br /><?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor2', $row->fulltext, 'fulltext', 500, 350, '50', '15');
        ?>
					</td>
				</tr>
				</table>
			</td>
			<td valign="top" width="40%">
				<table>
				<tr>
					<td>
					<?php 
        $tabs->startPane("content-pane");
        $tabs->startTab($adminLanguage->A_COMP_CONTENT_PUBLISHING, "publish-page");
        ?>
					<table class="adminform">
					<tr>
						<th colspan="2">
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_PUB_INFO;
        ?>
						</th>
					<tr>
					<tr>
						<td valign="top" align="right">
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_FRONTPAGE;
        ?>
:
						</td>
						<td>
						<input type="checkbox" name="frontpage" value="1" <?php 
        echo $row->frontpage ? 'checked="checked"' : '';
        ?>
 />
						</td>
					</tr>
					<tr>
						<td valign="top" align="right">
						<?php 
        echo $adminLanguage->A_COMP_PUBLISHED;
        ?>
:
						</td>
						<td>
						<input type="checkbox" name="published" value="1" <?php 
        echo $row->state ? 'checked="checked"' : '';
        ?>
 />
						</td>
					</tr>
					<tr>
						<td valign="top" align="right">
						<?php 
        echo $adminLanguage->A_COMP_ACCESS_LEVEL;
        ?>
:
						</td>
						<td>
						<?php 
        echo $lists['access'];
        ?>
 </td>
						</tr>
					<tr>
						<td valign="top" align="right">
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_AUTHOR;
        ?>
:
						</td>
						<td>
						<input type="text" name="created_by_alias" size="30" maxlength="100" value="<?php 
        echo $row->created_by_alias;
        ?>
" class="text_area" />
						</td>
					</tr>
					<tr>
						<td valign="top" align="right">
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_CREATOR;
        ?>
:
						</td>
						<td>
						<?php 
        echo $lists['created_by'];
        ?>
 </td>
					</tr>
					<tr>
						<td valign="top" align="right"><?php 
        echo $adminLanguage->A_COMP_ORDERING;
        ?>
:</td>
						<td>
						<?php 
        echo $lists['ordering'];
        ?>
 </td>
					</tr>
					<tr>
						<td valign="top" align="right">
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_OVERRIDE;
        ?>
						</td>
						<td>
						<input class="text_area" type="text" name="created" id="created" size="25" maxlength="19" value="<?php 
        echo $row->created;
        ?>
" />
						<input name="reset" type="reset" class="button" onClick="return showCalendar('created', 'y-mm-dd');" value="...">
						</td>
					</tr>
					<tr>
						<td valign="top" align="right">
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_START_PUB;
        ?>
:
						</td>
						<td>
						<input class="text_area" type="text" name="publish_up" id="publish_up" size="25" maxlength="19" value="<?php 
        echo $row->publish_up;
        ?>
" />
						<input type="reset" class="button" value="..." onClick="return showCalendar('publish_up', 'y-mm-dd');">
						</td>
					</tr>
					<tr>
						<td valign="top" align="right">
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_FINISH_PUB;
        ?>
:
						</td>
						<td>
						<input class="text_area" type="text" name="publish_down" id="publish_down" size="25" maxlength="19" value="<?php 
        echo $row->publish_down;
        ?>
" />
						<input type="reset" class="button" value="..." onClick="return showCalendar('publish_down', 'y-mm-dd');">
						</td>
					</tr>
					</table>
					<br />
					<table class="adminform">
					<tr>
						<td width="90px" valign="top" align="right">
						<strong><?php 
        echo $adminLanguage->A_COMP_STATE;
        ?>
:</strong>
						</td>
						<td>
						<?php 
        echo $row->state > 0 ? $adminLanguage->A_COMP_PUBLISHED : ($row->state < 0 ? $adminLanguage->A_COMP_ARCHIVED : $adminLanguage->A_COMP_CONTENT_DRAFT_UNPUB);
        ?>
						</td>
					</tr>
					<tr >
						<td valign="top" align="right">
						<strong>
						<?php 
        echo $adminLanguage->A_COMP_HITS;
        ?>
						</strong>:
						</td>
						<td>
						<?php 
        echo $row->hits;
        ?>
						<div <?php 
        echo $visibility;
        ?>
>
						<input name="reset_hits" type="button" class="button" value="<?php 
        echo $adminLanguage->A_COMP_CONTENT_RESET_HIT;
        ?>
" onClick="submitbutton('resethits');">
						</div>
						</td>
					</tr>
					<tr>
						<td valign="top" align="right">
						<strong>
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_REVISED;
        ?>
						</strong>:
						</td>
						<td>
						<?php 
        echo $row->version;
        echo $adminLanguage->A_COMP_CONTENT_TIMES;
        ?>
						</td>
					</tr>
					<tr>
						<td valign="top" align="right">
						<strong>
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_CREATED;
        ?>
						</strong>
						</td>
						<td>
						<?php 
        echo $row->created ? "{$create_date}</td></tr><tr><td valign='top' align='right'><strong>" . $adminLanguage->A_COMP_CONTENT_BY . "</strong></td><td>{$row->creator}" : $adminLanguage->A_COMP_CONTENT_NEW_DOC;
        ?>
						</td>
					</tr>
					<tr>
						<td valign="top" align="right">
						<strong>
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_LAST_MOD;
        ?>
						</strong>
						</td>
						<td>
						<?php 
        echo $row->modified ? "{$mod_date}</td></tr><tr><td valign='top' align='right'><strong>" . $adminLanguage->A_COMP_CONTENT_BY . "</strong></td><td>{$row->modifier}" : $adminLanguage->A_COMP_CONTENT_NOT_MOD;
        ?>
						</td>
					</tr>
					</table>
					<?php 
        $tabs->endTab();
        $tabs->startTab($adminLanguage->A_COMP_CONTENT_IMAGES2, $adminLanguage->A_COMP_CONT_IMG_PAGE);
        ?>
					<table class="adminform" width="100%">
					<tr>
						<th colspan="2">
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_MOSIMAGE;
        ?>
						</th>
					<tr>
					<tr>
						<td colspan="6"><?php 
        echo $adminLanguage->A_COMP_CONTENT_SUB_FOLDER;
        ?>
: <?php 
        echo $lists['folders'];
        ?>
</td>
					</tr>
					<tr>
						<td>
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_GALLERY;
        ?>
:
						<br />
						<?php 
        echo $lists['imagefiles'];
        ?>
						</td>
						<td valign="top">
						<img name="view_imagefiles" src="../images/M_images/blank.png" width="100" />
						</td>
					</tr>
					<tr>
						<td>
						<input class="button" type="button" value="<?php 
        echo $adminLanguage->A_COMP_ADD;
        ?>
" onClick="addSelectedToList('adminForm','imagefiles','imagelist')" />
						</td>
					</tr>
					<tr>
						<td>
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_IMAGES;
        ?>
:
						<br />
						<?php 
        echo $lists['imagelist'];
        ?>
						</td>
						<td valign="top">
						<img name="view_imagelist" src="../images/M_images/blank.png" width="100" />
						</td>
					</tr>
					<tr>
						<td>
						<input class="button" type="button" value="<?php 
        echo $adminLanguage->A_COMP_CONTENT_UP;
        ?>
" onClick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,-1)" />
						<input class="button" type="button" value="<?php 
        echo $adminLanguage->A_COMP_CONTENT_DOWN;
        ?>
" onClick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,+1)" />
						<input class="button" type="button" value="<?php 
        echo $adminLanguage->A_COMP_CONTENT_REMOVE;
        ?>
" onClick="delSelectedFromList('adminForm','imagelist')" />
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<?php 
        echo $adminLanguage->A_COMP_CONTENT_EDIT_IMAGE;
        ?>
:
							<table>
							<tr>
								<td align="right">
								<?php 
        echo $adminLanguage->A_COMP_SOURCE;
        ?>
:
								</td>
								<td>
								<input class="text_area" type="text" name= "_source" value="" />
								</td>
							</tr>
							<tr>
								<td align="right">
								<?php 
        echo $adminLanguage->A_COMP_CONTENT_ALIGN;
        ?>
:
								</td>
								<td>
								<?php 
        echo $lists['_align'];
        ?>
								</td>
							</tr>
							<tr>
								<td align="right">
								<?php 
        echo $adminLanguage->A_COMP_CONTENT_ALT;
        ?>
:
								</td>
								<td>
								<input class="text_area" type="text" name="_alt" value="" />
								</td>
							</tr>
							<tr>
								<td align="right">
								<?php 
        echo $adminLanguage->A_COMP_CONTENT_BORDER;
        ?>
:
								</td>
								<td>
								<input class="text_area" type="text" name="_border" value="" size="3" maxlength="1" />
								</td>
							</tr>
							<tr>
								<td colspan="2">
								<input class="button" type="button" value="<?php 
        echo $adminLanguage->A_COMP_CONTENT_APPLY;
        ?>
" onClick="applyImageProps()" />
								</td>
							</tr>
							</table>
						</td>
					</tr>
					</table>
					<?php 
        $tabs->endTab();
        $tabs->startTab($adminLanguage->A_COMP_CONT_PARAMETERS, "params-page");
        ?>
					<table class="adminform">
					<tr>
						<th colspan="2">
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_PARAM;
        ?>
						</th>
					<tr>
					<tr>
						<td>
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_PARAM_MESS;
        ?>
						<br /><br />
						</td>
					</tr>
					<tr>
						<td>
						<?php 
        echo $params->render();
        ?>
						</td>
					</tr>
					</table>
					<?php 
        $tabs->endTab();
        $tabs->startTab($adminLanguage->A_COMP_CONTENT_META_INFO, $adminLanguage->A_COMP_CONF_META_PAGE);
        ?>
					<table class="adminform">
					<tr>
						<th colspan="2">
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_META_DATA;
        ?>
						</th>
					<tr>
					<tr>
						<td>
						<?php 
        echo $adminLanguage->A_COMP_DESCRIPTION;
        ?>
:
						<br />
						<textarea class="text_area" cols="30" rows="3" style="width:300px; height:50px" name="metadesc" width="500"><?php 
        echo str_replace('&', '&amp;', $row->metadesc);
        ?>
</textarea>
						</td>
					</tr>
						<tr>
						<td>
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_KEYWORDS;
        ?>
:
						<br />
						<textarea class="text_area" cols="30" rows="3" style="width:300px; height:50px" name="metakey" width="500"><?php 
        echo str_replace('&', '&amp;', $row->metakey);
        ?>
</textarea>
						</td>
					</tr>
					<tr>
						<td>
						<input type="button" class="button" value="<?php 
        echo $adminLanguage->A_COMP_CONTENT_ADD_ETC;
        ?>
" onClick="f=document.adminForm;f.metakey.value=document.adminForm.sectionid.options[document.adminForm.sectionid.selectedIndex].text+', '+getSelectedText('adminForm','catid')+', '+f.title.value+f.metakey.value;" />
						</td>
					</tr>
					</table>
					<?php 
        $tabs->endTab();
        $tabs->startTab($adminLanguage->A_COMP_CONTENT_LINK_TO_MENU, $adminLanguage->A_COMP_CONTENT_LINK_PAGE);
        ?>
					<table class="adminform">
					<tr>
						<th colspan="2">
						<?php 
        echo $adminLanguage->A_COMP_LINK_TO_MENU;
        ?>
						</th>
					<tr>
					<tr>
						<td colspan="2">
						<?php 
        echo $adminLanguage->A_COMP_CONTENT_LINK_CI;
        ?>
						<br /><br />
						</td>
					<tr>
					<tr>
						<td valign="top" width="90px">
						<?php 
        echo $adminLanguage->A_COMP_SELECT_MENU;
        ?>
						</td>
						<td>
						<?php 
        echo $lists['menuselect'];
        ?>
						</td>
					<tr>
					<tr>
						<td valign="top" width="90px">
						<?php 
        echo $adminLanguage->A_COMP_MENU_NAME;
        ?>
						</td>
						<td>
						<input type="text" name="link_name" class="inputbox" value="" size="30" />
						</td>
					<tr>
					<tr>
						<td>
						</td>
						<td>
						<input name="menu_link" type="button" class="button" value="<?php 
        echo $adminLanguage->A_COMP_LINK_TO_MENU;
        ?>
" onClick="submitbutton('menulink');" />
						</td>
					<tr>
					<tr>
						<th colspan="2">
						<?php 
        echo $adminLanguage->A_COMP_MENU_LINKS;
        ?>
						</th>
					</tr>
					<?php 
        if ($menus == NULL) {
            ?>
						<tr>
							<td colspan="2">
							<?php 
            echo $adminLanguage->A_COMP_NONE;
            ?>
							</td>
						</tr>
						<?php 
        } else {
            foreach ($menus as $menu) {
                ?>
							<tr>
								<td colspan="2">
								<hr/>
								</td>
							</tr>
							<tr>
								<td width="90px" valign="top">
								<?php 
                echo $adminLanguage->A_COMP_MENU;
                ?>
								</td>
								<td>
								<?php 
                echo $menu->menutype;
                ?>
								</td>
							</tr>
							<tr>
								<td width="90px" valign="top">
								<?php 
                echo $adminLanguage->A_COMP_CONTENT_LINK_NAME;
                ?>
								</td>
								<td>
								<strong>
								<?php 
                echo $menu->name;
                ?>
								</strong>
								</td>
							</tr>
							<tr>
								<td width="90px" valign="top">
								<?php 
                echo $adminLanguage->A_COMP_STATE;
                ?>
								</td>
								<td>
								<?php 
                switch ($menu->published) {
                    case -2:
                        echo "<font color=\"red\">" . $adminLanguage->A_COMP_TRASHED . "</font>";
                        break;
                    case 0:
                        echo $adminLanguage->A_COMP_UNPUBLISHED;
                        break;
                    case 1:
                    default:
                        echo "<font color=\"green\">" . $adminLanguage->A_COMP_PUBLISHED . "</font>";
                        break;
                }
                ?>
								</td>
							</tr>
							<?php 
            }
        }
        ?>
					<tr>
						<td colspan="2">
						</td>
					</tr>
					</table>
					<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>
					</td>
				</tr>
				</table>
			</td>
		</tr>
		</table>
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="version" value="<?php 
        echo $row->version;
        ?>
" />
		<input type="hidden" name="mask" value="0" />
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="redirect" value="<?php 
        echo $redirect;
        ?>
" />
		<input type="hidden" name="task" value="" />
		</form>
		<script language="Javascript" src="<?php 
        echo $mosConfig_live_site;
        ?>
/includes/js/overlib_mini.js"></script>
		<?php 
    }
コード例 #23
0
		    </fieldset>
 		</td>
 	</tr>
</table><br />
<fieldset>
	<legend><?php 
echo $VM_LANG->_('PHPSHOP_STORE_FORM_DESCRIPTION');
?>
</legend>
	<?php 
editorArea('editor1', $db->f("vendor_store_desc"), 'vendor_store_desc', '400', '200', '70', '15');
?>
</fieldset>
<fieldset>
	<legend><?php 
echo $VM_LANG->_('PHPSHOP_STORE_FORM_TOS');
?>
</legend>
    <?php 
editorArea('editor2', $db->f("vendor_terms_of_service"), 'vendor_terms_of_service', '400', '200', '70', '15');
?>
</fieldset>
<?php 
// Add necessary hidden fields
$formObj->hiddenField('vendor_id', $ps_vendor_id);
$formObj->hiddenField('vendor_thumb_image_action', 'none');
$formObj->hiddenField('vendor_full_image_action', 'none');
$formObj->hiddenField('pshop_mode', 'admin');
// Write your form with mixed tags and text fields
// and finally close the form:
$formObj->finishForm("vendorUpdate", $modulename . '.display', $option);
コード例 #24
0
ファイル: admin.sections.html.php プロジェクト: cwcw/cms
    /**
     * Writes the edit form for new and existing categories
     *
     * A new record is defined when <var>$row</var> is passed with the <var>id</var>
     * property set to 0.  Note that the <var>section</var> property <b>must</b> be defined
     * even for a new record.
     * @param mosCategory The category object
     * @param string The html for the image list select list
     * @param string The html for the image position select list
     * @param string The html for the ordering list
     * @param string The html for the groups select list
     */
    function edit(&$row, $option, &$lists, &$menus)
    {
        global $mosConfig_live_site, $adminLanguage;
        if ($row->name != '') {
            $name = $row->name;
        } else {
            $name = $adminLanguage->A_COMP_SECT_NEW;
        }
        if ($row->image == "") {
            $row->image = 'blank.png';
        }
        ?>
		<script language="javascript" type="text/javascript">
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}

			if ( pressbutton == 'menulink' ) {
				if ( form.menuselect.value == "" ) {
					alert( "<?php 
        echo $adminLanguage->A_COMP_SECT_SEL_MENU;
        ?>
" );
					return;
				} else if ( form.link_type.value == "" ) {
					alert( "<?php 
        echo $adminLanguage->A_COMP_SELECT_MENU_TYPE;
        ?>
" );
					return;
				} else if ( form.link_name.value == "" ) {
					alert( "<?php 
        echo $adminLanguage->A_COMP_ENTER_MENU_NAME;
        ?>
" );
					return;
				} else if ( confirm('<?php 
        echo $adminLanguage->A_COMP_CREATE_MENU_LINK;
        ?>
') ){
					submitform( pressbutton );
				} else {
					return;
				}
			}

			if (form.name.value == ""){
				alert("<?php 
        echo $adminLanguage->A_COMP_SECT_MUST_NAME;
        ?>
");
			} else if (form.title.value ==""){
				alert("<?php 
        echo $adminLanguage->A_COMP_SECT_MUST_TITLE;
        ?>
");
			} else {
				<?php 
        getEditorContents('editor1', 'description');
        ?>
				submitform(pressbutton);
			}
		}
		</script>

		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th>
			<?php 
        echo $row->id ? $adminLanguage->A_COMP_EDIT : $adminLanguage->A_COMP_ADD;
        ?>
 <?php 
        echo $adminLanguage->A_COMP_SECTION;
        ?>
 <?php 
        echo " / " . $name;
        ?>
			</th>
		</tr>
		</table>

		<table width="100%">
		<tr>
			<td valign="top">
				<table class="adminform">
				<tr>
					<th colspan="3">
					<?php 
        echo $adminLanguage->A_COMP_SECT_DETAILS;
        ?>
					</th>
				<tr>
				<tr>
					<td width="150">
					<?php 
        echo $adminLanguage->A_COMP_SECT_SCOPE;
        ?>
:
					</td>
					<td width="85%" colspan="2">
					<strong>
					<?php 
        echo $row->scope;
        ?>
					</strong>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_TITLE;
        ?>
:
					</td>
					<td colspan="2">
					<input class="text_area" type="text" name="title" value="<?php 
        echo $row->title;
        ?>
" size="50" maxlength="50" title="<?php 
        echo $adminLanguage->A_COMP_SECT_SHORT_NAME;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo isset($row->section) ? $adminLanguage->A_COMP_CATEG : $adminLanguage->A_COMP_SECTION;
        ?>
 <?php 
        echo $adminLanguage->A_COMP_NAME;
        ?>
:
					</td>
					<td colspan="2">
					<input class="text_area" type="text" name="name" value="<?php 
        echo $row->name;
        ?>
" size="50" maxlength="255" title="<?php 
        echo $adminLanguage->A_COMP_SECT_LONG_NAME;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td>	
					<?php 
        echo $adminLanguage->A_COMP_IMAGE;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['image'];
        ?>
					</td>
					<td rowspan="4" width="50%">
					<?php 
        $path = $mosConfig_live_site . "/images/";
        if ($row->image != "blank.png") {
            $path .= "stories/";
        }
        ?>
					<img src="<?php 
        echo $path;
        echo $row->image;
        ?>
" name="imagelib" width="80" height="80" border="2" alt="<?php 
        echo $adminLanguage->A_COMP_PREVIEW;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_IMAGE_POSITION;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['image_position'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_ORDERING;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['ordering'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_ACCESS_LEVEL;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['access'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $adminLanguage->A_COMP_PUBLISHED;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['published'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top">
					<?php 
        echo $adminLanguage->A_COMP_DESCRIPTION;
        ?>
:
					</td>
					<td colspan="2">
					<?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor1', $row->description, 'description', '500', '200', '50', '5');
        ?>
					</td>
				</tr>
				</table>
			</td>
			<td valign="top">
			<?php 
        if ($row->id > 0) {
            ?>
				
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
            echo $adminLanguage->A_COMP_LINK_TO_MENU;
            ?>
					</th>
				<tr>
				<tr>
					<td colspan="2">
					<?php 
            echo $adminLanguage->A_COMP_CREATE_MENU;
            ?>
					<br /><br />
					</td>
				<tr>
				<tr>
					<td valign="top" width="100px">
					<?php 
            echo $adminLanguage->A_COMP_SELECT_MENU;
            ?>
					</td>
					<td>
					<?php 
            echo $lists['menuselect'];
            ?>
					</td>
				<tr>
				<tr>
					<td valign="top" width="100px">
					<?php 
            echo $adminLanguage->A_COMP_MENU_TYPE;
            ?>
					</td>
					<td>
					<?php 
            echo $lists['link_type'];
            ?>
					</td>
				<tr>
				<tr>
					<td valign="top" width="100px">
					<?php 
            echo $adminLanguage->A_COMP_MENU_NAME;
            ?>
					</td>
					<td>
					<input type="text" name="link_name" class="inputbox" value="" size="25" />
					</td>
				<tr>
				<tr>
					<td>
					</td>
					<td>
					<input name="menu_link" type="button" class="button" value="<?php 
            echo $adminLanguage->A_COMP_LINK_TO_MENU;
            ?>
" onClick="submitbutton('menulink');" />
					</td>
				<tr>
				<tr>
					<th colspan="2">
					<?php 
            echo $adminLanguage->A_COMP_MENU_LINKS;
            ?>
					</th>
				</tr>
				<?php 
            if ($menus == NULL) {
                ?>
					<tr>
						<td colspan="2">
						<?php 
                echo $adminLanguage->A_COMP_NONE;
                ?>
						</td>
					</tr>
					<?php 
            } else {
                foreach ($menus as $menu) {
                    ?>
						<tr>
							<td colspan="2">
							<hr/>
							</td>
						</tr>
						<tr>
							<td width="90px" valign="top">
							<?php 
                    echo $adminLanguage->A_COMP_MENU;
                    ?>
							</td>
							<td>
							<?php 
                    echo $menu->menutype;
                    ?>
  
							</td>
						</tr>
						<tr>
							<td width="90px" valign="top">
							<?php 
                    echo $adminLanguage->A_COMP_TYPE;
                    ?>
							</td>
							<td>
							<?php 
                    echo $menu->type;
                    ?>
  
							</td>
						</tr>
						<tr>
							<td width="90px" valign="top">
							<?php 
                    echo $adminLanguage->A_COMP_ITEM_NAME;
                    ?>
							</td>
							<td>
							<strong>
							<?php 
                    echo $menu->name;
                    ?>
  
							</strong>
							</td>
						</tr>
						<tr>
							<td width="90px" valign="top">
							<?php 
                    echo $adminLanguage->A_COMP_STATE;
                    ?>
							</td>
							<td>
							<?php 
                    switch ($menu->published) {
                        case -2:
                            echo '<font color="red">' . $adminLanguage->A_COMP_TRASHED . '</font>';
                            break;
                        case 0:
                            echo $adminLanguage->A_COMP_UNPUBLISHED;
                            break;
                        case 1:
                        default:
                            echo '<font color="green">' . $adminLanguage->A_COMP_PUBLISHED . '</font>';
                            break;
                    }
                    ?>
  
							</td>
						</tr>
						<?php 
                }
            }
            ?>
				<tr>
					<td colspan="2">
					</td>
				</tr>
				</table>
				<?php 
        }
        ?>
			</td>
		</tr>
		</table>

		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="scope" value="<?php 
        echo $row->scope;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="oldtitle" value="<?php 
        echo $row->title;
        ?>
" />
		</form>
		<?php 
    }
コード例 #25
0
    /**
     * Writes the edit form for new and existing content item
     *
     * A new record is defined when <var>$row</var> is passed with the <var>id</var>
     * property set to 0.
     * @param mosContent The category object
     * @param string The html for the groups select list
     */
    function editContent(&$row, $section, &$lists, &$images, &$access, $myid, $sectionid, $task, $Itemid)
    {
        global $mosConfig_live_site, $mainframe;
        mosMakeHtmlSafe($row);
        require_once $GLOBALS['mosConfig_absolute_path'] . '/includes/HTML_toolbar.php';
        // used for spoof hardening
        $validate = josSpoofValue();
        $Returnid = intval(mosGetParam($_REQUEST, 'Returnid', $Itemid));
        $tabs = new mosTabs(0, 1);
        $mainframe->addCustomHeadTag('<link rel="stylesheet" type="text/css" media="all" href="includes/js/calendar/calendar-mos.css" title="green" />');
        ?>
  		<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
		<!-- import the calendar script -->
		<script language="javascript" type="text/javascript" src="<?php 
        echo $mosConfig_live_site;
        ?>
/includes/js/calendar/calendar_mini.js"></script>
		<!-- import the language module -->
		<script language="javascript" type="text/javascript" src="<?php 
        echo $mosConfig_live_site;
        ?>
/includes/js/calendar/lang/calendar-en.js"></script>
	  	<script language="javascript" type="text/javascript" src="<?php 
        echo $mosConfig_live_site;
        ?>
/includes/js/overlib_mini.js"></script>
	  	<script language="javascript" type="text/javascript">
		onunload = WarnUser;
		var folderimages = new Array;
		<?php 
        $i = 0;
        foreach ($images as $k => $items) {
            foreach ($items as $v) {
                echo "\n\tfolderimages[" . $i++ . "] = new Array( '{$k}','" . addslashes($v->value) . "','" . addslashes($v->text) . "' );";
            }
        }
        ?>
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}

			// var goodexit=false;
			// assemble the images back into one field
			form.goodexit.value=1;
			var temp = new Array;
			for (var i=0, n=form.imagelist.options.length; i < n; i++) {
				temp[i] = form.imagelist.options[i].value;
			}
			form.images.value = temp.join( '\n' );
			try {
				form.onsubmit();
			}
			catch(e){}
			// do field validation
			if (form.title.value == "") {
				alert ( "<?php 
        echo addslashes(_E_WARNTITLE);
        ?>
" );
			} else if (parseInt('<?php 
        echo $row->sectionid;
        ?>
')) {
				// for content items
				if (getSelectedValue('adminForm','catid') < 1) {
					alert ( "<?php 
        echo addslashes(_E_WARNCAT);
        ?>
" );
				//} else if (form.introtext.value == "") {
				//	alert ( "<?php 
        echo addslashes(_E_WARNTEXT);
        ?>
" );
				} else {
					<?php 
        getEditorContents('editor1', 'introtext');
        getEditorContents('editor2', 'fulltext');
        ?>
					submitform(pressbutton);
				}
			//} else if (form.introtext.value == "") {
			//	alert ( "<?php 
        echo addslashes(_E_WARNTEXT);
        ?>
" );
			} else {
				// for static content
				<?php 
        getEditorContents('editor1', 'introtext');
        ?>
				submitform(pressbutton);
			}
		}

		function setgood(){
			document.adminForm.goodexit.value=1;
		}

		function WarnUser(){
			if (document.adminForm.goodexit.value==0) {
				alert('<?php 
        echo addslashes(_E_WARNUSER);
        ?>
');
				window.location="<?php 
        echo sefRelToAbs("index.php?option=com_content&task=" . $task . "&sectionid=" . $sectionid . "&id=" . $row->id . "&Itemid=" . $Itemid);
        ?>
";
			}
		}
		</script>

		<?php 
        $docinfo = "<strong>" . _E_EXPIRES . "</strong> ";
        $docinfo .= $row->publish_down . "<br />";
        $docinfo .= "<strong>" . _E_VERSION . "</strong> ";
        $docinfo .= $row->version . "<br />";
        $docinfo .= "<strong>" . _E_CREATED . "</strong> ";
        $docinfo .= $row->created . "<br />";
        $docinfo .= "<strong>" . _E_LAST_MOD . "</strong> ";
        $docinfo .= $row->modified . "<br />";
        $docinfo .= "<strong>" . _E_HITS . "</strong> ";
        $docinfo .= $row->hits . "<br />";
        ?>
		<form action="index.php" method="post" name="adminForm" onSubmit="javascript:setgood();">

		<table cellspacing="0" cellpadding="0" border="0" width="100%">
		<tr>
			<td class="contentheading" >
			<?php 
        echo $section;
        ?>
 / <?php 
        echo $row->id ? _E_EDIT : _E_ADD;
        ?>
&nbsp;
			<?php 
        echo _E_CONTENT;
        ?>
 &nbsp;&nbsp;&nbsp;
			<a href="javascript: void(0);" onMouseOver="return overlib('<table><?php 
        echo $docinfo;
        ?>
</table>', CAPTION, '<?php 
        echo _E_ITEM_INFO;
        ?>
', BELOW, RIGHT);" onMouseOut="return nd();">
			<strong>[Info]</strong>
			</a>
			</td>
		</tr>
		</table>

		<table class="adminform">
		<tr>
			<td>
				<div style="float: left;">
					<?php 
        echo _E_TITLE;
        ?>
					<br />
					<input class="inputbox" type="text" name="title" size="50" maxlength="100" value="<?php 
        echo $row->title;
        ?>
" />
				</div>
				<div style="float: right;">
					<?php 
        // Toolbar Top
        mosToolBar::startTable();
        mosToolBar::save();
        mosToolBar::apply('apply_new');
        mosToolBar::cancel();
        mosToolBar::endtable();
        ?>
				</div>
			</td>
		</tr>
		<?php 
        if ($row->sectionid) {
            ?>
			<tr>
				<td>
				<?php 
            echo _E_CATEGORY;
            ?>
				<br />
				<?php 
            echo $lists['catid'];
            ?>
				</td>
			</tr>
			<?php 
        }
        ?>
		<tr>
			<?php 
        if (intval($row->sectionid) > 0) {
            ?>
				<td>
				<?php 
            echo _E_INTRO . ' (' . _CMN_REQUIRED . ')';
            ?>
:
				</td>
				<?php 
        } else {
            ?>
				<td>
				<?php 
            echo _E_MAIN . ' (' . _CMN_REQUIRED . ')';
            ?>
:
				</td>
			<?php 
        }
        ?>
		</tr>
		<tr>
			<td>
			<?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor1', $row->introtext, 'introtext', '600', '400', '70', '15');
        ?>
			</td>
		</tr>
		<?php 
        if (intval($row->sectionid) > 0) {
            ?>
			<tr>
				<td>
				<?php 
            echo _E_MAIN . ' (' . _CMN_OPTIONAL . ')';
            ?>
:
				</td>
			</tr>
			<tr>
				<td>
				<?php 
            // parameters : areaname, content, hidden field, width, height, rows, cols
            editorArea('editor2', $row->fulltext, 'fulltext', '600', '400', '70', '15');
            ?>
				</td>
			</tr>
			<?php 
        }
        ?>
		</table>

		<?php 
        // Toolbar Bottom
        mosToolBar::startTable();
        mosToolBar::save();
        mosToolBar::apply();
        mosToolBar::cancel();
        mosToolBar::endtable();
        ?>

	 	<?php 
        $tabs->startPane('content-pane');
        $tabs->startTab(_E_IMAGES, 'images-page');
        ?>
			<table class="adminform">
			<tr>
				<td colspan="4">
				<?php 
        echo _CMN_SUBFOLDER;
        ?>
 :: <?php 
        echo $lists['folders'];
        ?>
				</td>
			</tr>
			<tr>
				<td align="top">
					<?php 
        echo _E_GALLERY_IMAGES;
        ?>
				</td>
				<td width="2%">
				</td>
				<td align="top">
					<?php 
        echo _E_CONTENT_IMAGES;
        ?>
				</td>
				<td align="top">
					<?php 
        echo _E_EDIT_IMAGE;
        ?>
				</td>
			</tr>
			<tr>
				<td valign="top">
					<?php 
        echo $lists['imagefiles'];
        ?>
					<br />
					<input class="button" type="button" value="<?php 
        echo _E_INSERT;
        ?>
" onclick="addSelectedToList('adminForm','imagefiles','imagelist')" />
				</td>
				<td width="2%">
					<input class="button" type="button" value=">>" onclick="addSelectedToList('adminForm','imagefiles','imagelist')" title="<?php 
        echo _E_ADD;
        ?>
"/>
					<br/>
					<input class="button" type="button" value="<<" onclick="delSelectedFromList('adminForm','imagelist')" title="<?php 
        echo _E_REMOVE;
        ?>
"/>
				</td>
				<td valign="top">
					<?php 
        echo $lists['imagelist'];
        ?>
					<br />
					<input class="button" type="button" value="<?php 
        echo _E_UP;
        ?>
" onclick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,-1)" />
					<input class="button" type="button" value="<?php 
        echo _E_DOWN;
        ?>
" onclick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,+1)" />
				</td>
				<td valign="top">
					<table>
					<tr>
						<td align="right">
						<?php 
        echo _E_SOURCE;
        ?>
						</td>
						<td>
						<input class="inputbox" type="text" name= "_source" value="" size="15" />
						</td>
					</tr>
					<tr>
						<td align="right" valign="top">
						<?php 
        echo _E_ALIGN;
        ?>
						</td>
						<td>
						<?php 
        echo $lists['_align'];
        ?>
						</td>
					</tr>
					<tr>
						<td align="right">
						<?php 
        echo _E_ALT;
        ?>
						</td>
						<td>
						<input class="inputbox" type="text" name="_alt" value="" size="15" />
						</td>
					</tr>
					<tr>
						<td align="right">
						<?php 
        echo _E_BORDER;
        ?>
						</td>
						<td>
						<input class="inputbox" type="text" name="_border" value="" size="3" maxlength="1" />
						</td>
					</tr>
					<tr>
						<td align="right">
						<?php 
        echo _E_CAPTION;
        ?>
:
						</td>
						<td>
						<input class="text_area" type="text" name="_caption" value="" size="30" />
						</td>
					</tr>
					<tr>
						<td align="right">
						<?php 
        echo _E_CAPTION_POSITION;
        ?>
:
						</td>
						<td>
						<?php 
        echo $lists['_caption_position'];
        ?>
						</td>
					</tr>
					<tr>
						<td align="right">
						<?php 
        echo _E_CAPTION_ALIGN;
        ?>
:
						</td>
						<td>
						<?php 
        echo $lists['_caption_align'];
        ?>
						</td>
					</tr>
					<tr>
						<td align="right">
						<?php 
        echo _E_CAPTION_WIDTH;
        ?>
:
						</td>
						<td>
						<input class="text_area" type="text" name="_width" value="" size="5" maxlength="5" />
						</td>
					</tr>
					<tr>
						<td align="right">
						</td>
						<td>
						<input class="button" type="button" value="<?php 
        echo _E_APPLY;
        ?>
" onclick="applyImageProps()" />
						</td>
					</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<img name="view_imagefiles" src="<?php 
        echo $mosConfig_live_site;
        ?>
/images/M_images/blank.png" width="50" alt="<?php 
        echo _E_NO_IMAGE;
        ?>
" />
				</td>
				<td width="2%">
				</td>
				<td>
					<img name="view_imagelist" src="<?php 
        echo $mosConfig_live_site;
        ?>
/images/M_images/blank.png" width="50" alt="<?php 
        echo _E_NO_IMAGE;
        ?>
" />
				</td>
				<td>
				</td>
			</tr>
			</table>
		<?php 
        $tabs->endTab();
        $tabs->startTab(_E_PUBLISHING, 'publish-page');
        ?>
			<table class="adminform">
			<?php 
        if ($access->canPublish) {
            ?>
				<tr>
					<td align="left">
					<?php 
            echo _E_STATE;
            ?>
					</td>
					<td>
					<?php 
            echo $lists['state'];
            ?>
					</td>
				</tr>
				<?php 
        }
        ?>
			<tr>
				<td align="left">
				<?php 
        echo _E_ACCESS_LEVEL;
        ?>
				</td>
				<td>
				<?php 
        echo $lists['access'];
        ?>
				</td>
			</tr>
			<tr>
				<td align="left">
				<?php 
        echo _E_AUTHOR_ALIAS;
        ?>
				</td>
				<td>
				<input type="text" name="created_by_alias" size="50" maxlength="100" value="<?php 
        echo $row->created_by_alias;
        ?>
" class="inputbox" />
				</td>
			</tr>
			<tr>
				<td align="left">
				<?php 
        echo _E_ORDERING;
        ?>
				</td>
				<td>
				<?php 
        echo $lists['ordering'];
        ?>
				</td>
			</tr>
			<tr>
				<td align="left">
				<?php 
        echo _E_START_PUB;
        ?>
				</td>
				<td>
				<input class="inputbox" type="text" name="publish_up" id="publish_up" size="25" maxlength="19" value="<?php 
        echo $row->publish_up;
        ?>
" />
				<input type="reset" class="button" value="..." onclick="return showCalendar('publish_up', 'y-mm-dd');" />
				</td>
			</tr>
			<tr>
				<td align="left">
				<?php 
        echo _E_FINISH_PUB;
        ?>
				</td>
				<td>
				<input class="inputbox" type="text" name="publish_down" id="publish_down" size="25" maxlength="19" value="<?php 
        echo $row->publish_down;
        ?>
" />
				<input type="reset" class="button" value="..." onclick="return showCalendar('publish_down', 'y-mm-dd');" />
				</td>
			</tr>
			<tr>
				<td align="left">
				<?php 
        echo _E_SHOW_FP;
        ?>
				</td>
				<td>
				<input type="checkbox" name="frontpage" value="1" <?php 
        echo $row->frontpage ? 'checked="checked"' : '';
        ?>
 />
				</td>
			</tr>
			</table>
		<?php 
        $tabs->endTab();
        $tabs->startTab(_E_METADATA, 'meta-page');
        ?>
			<table class="adminform">
			<tr>
				<td align="left" valign="top">
				<?php 
        echo _E_M_DESC;
        ?>
				</td>
				<td>
				<textarea class="inputbox" cols="45" rows="3" name="metadesc"><?php 
        echo str_replace('&', '&amp;', $row->metadesc);
        ?>
</textarea>
				</td>
			</tr>
			<tr>
				<td align="left" valign="top">
				<?php 
        echo _E_M_KEY;
        ?>
				</td>
				<td>
				<textarea class="inputbox" cols="45" rows="3" name="metakey"><?php 
        echo str_replace('&', '&amp;', $row->metakey);
        ?>
</textarea>
				</td>
			</tr>
			</table>
		<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>

		<div style="clear:both;"></div>

		<input type="hidden" name="images" value="" />
		<input type="hidden" name="goodexit" value="0" />
		<input type="hidden" name="option" value="com_content" />
		<input type="hidden" name="Returnid" value="<?php 
        echo $Returnid;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="version" value="<?php 
        echo $row->version;
        ?>
" />
		<input type="hidden" name="sectionid" value="<?php 
        echo $row->sectionid;
        ?>
" />
		<input type="hidden" name="created_by" value="<?php 
        echo $row->created_by;
        ?>
" />
		<input type="hidden" name="referer" value="<?php 
        echo ampReplace(@$_SERVER['HTTP_REFERER']);
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="<?php 
        echo $validate;
        ?>
" value="1" />
		</form>
		<?php 
    }
コード例 #26
0
ファイル: ps_userfield.php プロジェクト: albertobraschi/Hab
    /**
     * This allows us to print the user fields on
     * the various sections of the shop
     *
     * @param array $rowFields An array returned from ps_database::loadObjectlist
     * @param array $skipFields A one-dimensional array holding the names of fields that should NOT be displayed
     * @param ps_DB $db A ps_DB object holding ovalues for the fields
     * @param boolean $startform If true, print the starting <form...> tag
     */
    function listUserFields($rowFields, $skipFields = array(), $db = null, $startForm = true)
    {
        global $mm_action_url, $ps_html, $VM_LANG, $my, $default, $mainframe, $vm_mainframe, $vendor_country_3_code, $mosConfig_live_site, $mosConfig_absolute_path, $page;
        $dbf = new ps_DB();
        if ($db === null) {
            $db = new ps_DB();
        }
        $default['country'] = $vendor_country_3_code;
        $missing = vmGet($_REQUEST, 'missing', '');
        // collect all required fields
        $required_fields = array();
        foreach ($rowFields as $field) {
            if ($field->required == 1) {
                $required_fields[$field->name] = $field->type;
            }
            $allfields[$field->name] = $field->name;
        }
        foreach ($skipFields as $skip) {
            unset($required_fields[$skip]);
        }
        // Form validation function
        if (!vmIsAdminMode()) {
            ps_userfield::printJS_formvalidation($required_fields, $rowFields);
        } else {
            echo vmCommonHTML::scriptTag('', 'function submitregistration() { return true }');
        }
        if (file_exists($mosConfig_absolute_path . '/includes/js/mambojavascript.js')) {
            $vm_mainframe->addScript('includes/js/mambojavascript.js');
        }
        if ($startForm) {
            echo '<form action="' . $mm_action_url . basename($_SERVER['PHP_SELF']) . '" method="post" name="adminForm">';
        }
        echo '
		<div style="width:90%;">';
        if (!empty($required_fields)) {
            echo '<div style="padding:5px;text-align:center;"><strong>(* = ' . $VM_LANG->_('CMN_REQUIRED') . ')</strong></div>';
        }
        $delimiter = 0;
        foreach ($rowFields as $field) {
            if (!isset($default[$field->name])) {
                $default[$field->name] = $field->default;
            }
            $readonly = $field->readonly ? ' readonly="readonly"' : '';
            if (in_array($field->name, $skipFields)) {
                continue;
            }
            // Title handling.
            $key = $field->title;
            if ($key[0] == '_') {
                $key = substr($key, 1, strlen($key) - 1);
            }
            if ($VM_LANG->exists($key)) {
                $field->title = $VM_LANG->_($key);
            }
            if ($field->name == 'agreed') {
                $field->title = '<script type="text/javascript">//<![CDATA[
				document.write(\'<label for="agreed_field">' . str_replace("'", "\\'", $VM_LANG->_('PHPSHOP_I_AGREE_TO_TOS')) . '</label><a href="javascript:void window.open(\\\'' . $mosConfig_live_site . '/index2.php?option=com_virtuemart&page=shop.tos&pop=1\\\', \\\'win2\\\', \\\'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no\\\');">\');
				document.write(\' (' . $VM_LANG->_('PHPSHOP_STORE_FORM_TOS') . ')</a>\');
				//]]></script>
				<noscript>
					<label for="agreed_field">' . $VM_LANG->_('PHPSHOP_I_AGREE_TO_TOS') . '</label>
					<a target="_blank" href="' . $mosConfig_live_site . '/index.php?option=com_virtuemart&amp;page=shop.tos" title="' . $VM_LANG->_('PHPSHOP_I_AGREE_TO_TOS') . '">
					 (' . $VM_LANG->_('PHPSHOP_STORE_FORM_TOS') . ')
					</a></noscript>';
            }
            if ($field->name == 'username' && VM_REGISTRATION_TYPE == 'OPTIONAL_REGISTRATION') {
                echo '<div class="formLabel">
						<input type="checkbox" id="register_account" name="register_account" value="1" class="inputbox" onchange="showFields( this.checked, new Array(\'username\', \'password\', \'password2\') );if( this.checked ) { document.adminForm.remember.value=\'yes\'; } else { document.adminForm.remember.value=\'yes\'; }" checked="checked" />
					</div>
					<div class="formField">
						<label for="register_account">' . $VM_LANG->_('VM_REGISTER_ACCOUNT') . '</label>
					</div>
					';
            } elseif ($field->name == 'username') {
                echo '<input type="hidden" id="register_account" name="register_account" value="1" />';
            }
            // a delimiter marks the beginning of a new fieldset and
            // the end of a previous fieldset
            if ($field->type == 'delimiter') {
                if ($delimiter > 0) {
                    echo "</fieldset>\n";
                }
                if (VM_REGISTRATION_TYPE == 'SILENT_REGISTRATION' && $field->title == $VM_LANG->_('PHPSHOP_ORDER_PRINT_CUST_INFO_LBL') && $page == 'checkout.index') {
                    continue;
                }
                echo '<fieldset>
				     <legend class="sectiontableheader">' . $field->title . '</legend>
';
                $delimiter++;
                continue;
            }
            echo '<div id="' . $field->name . '_div" class="formLabel ';
            if (stristr($missing, $field->name)) {
                echo 'missing';
            }
            echo '">';
            echo '<label for="' . $field->name . '_field">' . $field->title . '</label>';
            if (isset($required_fields[$field->name])) {
                echo '<strong>* </strong>';
            }
            echo ' </div>
	      <div class="formField" id="' . $field->name . '_input">' . "\n";
            /**
             * This is the most important part of this file
             * Here we print the field & its contents!
             */
            switch ($field->name) {
                case 'title':
                    $ps_html->list_user_title($db->sf('title'), "id=\"title_field\"");
                    break;
                case 'country':
                    if (in_array('state', $allfields)) {
                        $onchange = "onchange=\"changeStateList();\"";
                    } else {
                        $onchange = "";
                    }
                    $ps_html->list_country("country", $db->sf('country'), "id=\"country_field\" {$onchange}");
                    break;
                case 'state':
                    echo $ps_html->dynamic_state_lists("country", "state", $db->sf('country'), $db->sf('state'));
                    echo "<noscript>\n";
                    $ps_html->list_states("state", $db->sf('state'), "", "id=\"state_field\"");
                    echo "</noscript>\n";
                    break;
                case 'agreed':
                    echo '<input type="checkbox" id="agreed_field" name="agreed" value="1" class="inputbox" />';
                    break;
                case 'password':
                case 'password2':
                    echo '<input type="password" id="' . $field->name . '_field" name="' . $field->name . '" size="30" class="inputbox" />' . "\n";
                    break;
                default:
                    switch ($field->type) {
                        case 'date':
                            echo vmCommonHTML::scriptTag($mosConfig_live_site . '/includes/js/calendar/calendar.js');
                            if (vmIsJoomla('1.5', '>=')) {
                                // in Joomla 1.5, the name of calendar lang file is changed...
                                echo vmCommonHTML::scriptTag($mosConfig_live_site . '/includes/js/calendar/lang/calendar-en-GB.js');
                            } else {
                                echo vmCommonHTML::scriptTag($mosConfig_live_site . '/includes/js/calendar/lang/calendar-en.js');
                            }
                            echo vmCommonHTML::linkTag($mosConfig_live_site . '/includes/js/calendar/calendar-mos.css');
                            $maxlength = $field->maxlength ? 'maxlength="' . $field->maxlength . '"' : '';
                            echo '<input type="text" id="' . $field->name . '_field" name="' . $field->name . '" size="' . $field->size . '" value="' . ($db->sf($field->name) ? $db->sf($field->name) : '') . '" class="inputbox" ' . $maxlength . $readonly . ' />' . "\n";
                            echo '<input name="reset" type="reset" class="button" onclick="return showCalendar(\'' . $field->name . '_field\', \'y-mm-dd\');" value="..." />';
                            break;
                        case 'text':
                        case 'emailaddress':
                        case 'webaddress':
                        case 'euvatid':
                            $maxlength = $field->maxlength ? 'maxlength="' . $field->maxlength . '"' : '';
                            echo '<input type="text" id="' . $field->name . '_field" name="' . $field->name . '" size="' . $field->size . '" value="' . ($db->sf($field->name) ? $db->sf($field->name) : '') . '" class="inputbox" ' . $maxlength . $readonly . ' />' . "\n";
                            break;
                        case 'textarea':
                            echo '<textarea name="' . $field->name . '" id="' . $field->name . '_field" cols="' . $field->cols . '" rows="' . $field->rows . '" ' . $readonly . '>' . $db->sf($field->name) . '</textarea>';
                            break;
                        case 'editorta':
                            editorArea($field->name, $db->sf($field->name), $field->name, '300', '150', $field->cols, $field->rows);
                            break;
                        case 'checkbox':
                            echo '<input type="checkbox" name="' . $field->name . '" id="' . $field->name . '_field" value="1" ' . ($db->sf($field->name) ? 'checked="checked"' : '') . '/>';
                            break;
                        case 'age_verification':
                            $year = vmRequest::getInt('birthday_selector_year', date('Y'));
                            if ($db->f($field->name)) {
                                $birthday = $db->f($field->name);
                                $date_array = explode('-', $birthday);
                                $year = $date_array[0];
                                $month = $date_array[1];
                                $day = $date_array[2];
                            }
                            ps_html::list_days('birthday_selector_day', vmRequest::getInt('birthday_selector_day', @$day));
                            ps_html::list_month('birthday_selector_month', vmRequest::getInt('birthday_selector_month', @$month));
                            ps_html::list_year('birthday_selector_year', $year, $year - 100, $year);
                            break;
                        case 'captcha':
                            if (file_exists($mosConfig_absolute_path . '/administrator/components/com_securityimages/client.php')) {
                                include $mosConfig_absolute_path . '/administrator/components/com_securityimages/client.php';
                                // Note that this package name must be used on the validation side too! If both are not equal, validation will fail
                                $packageName = 'securityVMRegistrationCheck';
                                echo insertSecurityImage($packageName);
                                echo getSecurityImageText($packageName);
                            } else {
                                if (file_exists($mosConfig_absolute_path . '/plugins/system/securityimages.php')) {
                                    echo "<script type=\"text/javascript\" src=\"" . JURI::root() . "/components/com_securityimages/js/securityImages.js\"></script>";
                                    echo "<img id='captchaSecurityImages' name='captchaSecurityImages' src=\"" . JURI::root() . "/index.php?option=com_securityimages&task=displayCaptcha\" />";
                                    echo "<a href=\"javascript:askNewSecurityImages('captchaSecurityImages');\">";
                                    echo "<img src=\"" . JURI::root() . "/components/com_securityimages/buttons/reload.gif\" id=\"securityImagesContactCaptchaReload\" name=\"securityImagesContactCaptchaReload\" border=\"0\">";
                                    echo "</a>";
                                    echo "<input type=\"text\" name=\"securityVMRegistrationCheck_try\" />";
                                }
                            }
                            break;
                            // Begin of a fallthrough
                        // Begin of a fallthrough
                        case 'multicheckbox':
                        case 'select':
                        case 'multiselect':
                        case 'radio':
                            $k = $db->f($field->name);
                            $dbf->setQuery("SELECT fieldtitle,fieldvalue FROM #__{vm}_userfield_values" . "\n WHERE fieldid = " . $field->fieldid . "\n ORDER BY ordering");
                            $Values = $dbf->loadObjectList();
                            $multi = "";
                            $rowFieldValues['lst_' . $field->name] = '';
                            if ($field->type == 'multiselect') {
                                $multi = "multiple='multiple'";
                            }
                            if (count($Values) > 0) {
                                if ($field->type == 'radio') {
                                    $rowFieldValues['lst_' . $field->name] = vmCommonHTML::radioListTable($Values, $field->name, 'class="inputbox" size="1" ', 'fieldvalue', 'fieldtitle', $k, $field->cols, $field->rows, $field->size, $field->required);
                                } else {
                                    $ks = explode("|*|", $k);
                                    $k = array();
                                    foreach ($ks as $kv) {
                                        $k[]->fieldvalue = $kv;
                                    }
                                    if ($field->type == 'multicheckbox') {
                                        $rowFieldValues['lst_' . $field->name] = vmCommonHTML::checkboxListTable($Values, $field->name . "[]", 'class="inputbox" size="' . $field->size . '" ' . $multi, 'fieldvalue', 'fieldtitle', $k, $field->cols, $field->rows, $field->size, $field->required);
                                    } else {
                                        $rowFieldValues['lst_' . $field->name] = vmCommonHTML::selectList($Values, $field->name . "[]", 'class="inputbox" size="' . $field->size . '" ' . $multi, 'fieldvalue', 'fieldtitle', $k);
                                    }
                                }
                            }
                            // no break! still a fallthrough
                            echo $rowFieldValues['lst_' . $field->name];
                            break;
                    }
                    break;
            }
            if ($field->description != '') {
                echo vmToolTip($field->description);
            }
            echo '<br /></div>
				      <br style="clear:both;" />';
        }
        if ($delimiter > 0) {
            echo "</fieldset>\n";
        }
        echo '</div>';
        if (VM_REGISTRATION_TYPE == 'OPTIONAL_REGISTRATION') {
            echo '<script type="text/javascript">
		   function showFields( show, fields ) {
		   	if( fields ) {
		   		for (i=0; i<fields.length;i++) {
		   			if( show ) {
		   				document.getElementById( fields[i] + \'_div\' ).style.display = \'\';
		   				document.getElementById( fields[i] + \'_input\' ).style.display = \'\';
		   			} else {
		   				document.getElementById( fields[i] + \'_div\' ).style.display = \'none\';
		   				document.getElementById( fields[i] + \'_input\' ).style.display = \'none\';
		   			}
		   		}
		   	}
		   }
		   try {
		   	showFields( document.getElementById( \'register_account\').checked, new Array(\'username\', \'password\', \'password2\') );
		   } catch(e){}
		   </script>';
        }
    }
コード例 #27
0
" />
        <?php 
echo vmToolTip($VM_LANG->_('PHPSHOP_SHOPPER_GROUP_FORM_DISCOUNT_TIP'));
?>
      </td>
    </tr> 
    <tr> 
      <td width="23%" valign="top"><strong><div align="right">
      <?php 
echo $VM_LANG->_('PHPSHOP_SHOPPER_GROUP_FORM_DESC');
?>
:</div></strong>
      </td>
      <td width="77%" valign="top" >
      <?php 
editorArea('editor1', $db->f('shopper_group_desc'), 'shopper_group_desc', 500, 250, 75, 25);
?>
      </td>
    </tr>
    <tr> 
      <td width="23%" valign="top" >&nbsp;</td>
      <td width="77%" valign="top" >&nbsp;</td>
    </tr>
</table>

<?php 
// Add necessary hidden fields
$formObj->hiddenField('shopper_group_id', $shopper_group_id);
$funcname = !empty($shopper_group_id) ? "shopperGroupUpdate" : "shopperGroupAdd";
// Write your form with mixed tags and text fields
// and finally close the form:
コード例 #28
0
    /**
     * Writes the edit form for new and existing module
     *
     * A new record is defined when <var>$row</var> is passed with the <var>id</var>
     * property set to 0.
     * @param mosCategory The category object
     * @param array <p>The modules of the left side.  The array elements are in the form
     * <var>$leftorder[<i>order</i>] = <i>label</i></var>
     * where <i>order</i> is the module order from the db table and <i>label</i> is a
     * text label associciated with the order.</p>
     * @param array See notes for leftorder
     * @param array An array of select lists
     * @param object Parameters
     */
    function editModule(&$row, &$orders2, &$lists, &$params, $option)
    {
        global $mosConfig_live_site;
        $row->titleA = '';
        if ($row->id) {
            $row->titleA = '<small><small>[ ' . $row->title . ' ]</small></small>';
        }
        mosCommonHTML::loadOverlib();
        ?>
		<script language="javascript" type="text/javascript">
		function submitbutton(pressbutton) {
			if ( pressbutton == 'save' ) {
				if ( document.adminForm.title.value == "" ) {
					alert("<?php 
        echo T_('Module must have a title');
        ?>
");
					return;
				} else if ( (document.adminForm.access.value == 2) && (document.adminForm.elements['groups[]'].selectedIndex < 0) ) {
						alert("<?php 
        echo T_('Special Access groups required for access level Special');
        ?>
");
						return;
				}
			} else {
				<?php 
        if ($row->module == "") {
            getEditorContents('editor1', 'content');
        }
        ?>
				submitform(pressbutton);
			}
			submitform(pressbutton);
		}
		<!--
		var originalOrder = '<?php 
        echo $row->ordering;
        ?>
';
		var originalPos = '<?php 
        echo $row->position;
        ?>
';
		var orders = new Array();	// array in the format [key,value,text]
		<?php 
        $i = 0;
        foreach ($orders2 as $k => $items) {
            foreach ($items as $v) {
                echo "\n\torders[" . $i++ . "] = new Array( \"{$k}\",\"{$v->value}\",\"{$v->text}\" );";
            }
        }
        ?>
		//-->
		</script>
		<table class="adminheading">
		<tr>
			<th class="modules">
			<?php 
        echo $lists['client_id'] ? T_('Administrator') : T_('Site');
        ?>
			<?php 
        echo T_('Module:');
        ?>
			<small>
			<?php 
        echo $row->id ? T_('Edit') : T_('New');
        ?>
			</small>
			<?php 
        echo $row->titleA;
        ?>
			</th>
		</tr>
		</table>

		<form action="index2.php" method="post" name="adminForm">

		<table cellspacing="0" cellpadding="0" width="100%">
		<tr valign="top">
			<td width="60%">
				<table class="adminform">
				<tr>
					<th colspan="2">
					<?php 
        echo T_('Details');
        ?>
					</th>
				</tr>
				<tr>
					<td width="100" align="left">
					<?php 
        echo T_('Title:');
        ?>
					</td>
					<td>
					<input class="text_area" type="text" name="title" size="35" value="<?php 
        echo $row->title;
        ?>
" />
					</td>
				</tr>
				<!-- START selectable pages -->
				<tr>
					<td width="100" align="left">
					<?php 
        echo T_('Show title:');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['showtitle'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="left">
					<?php 
        echo T_('Position:');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['position'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="left">
					<?php 
        echo T_('Module Order:');
        ?>
					</td>
					<td>
					<script language="javascript" type="text/javascript">
					<!--
					writeDynaList( 'class="inputbox" name="ordering" size="1"', orders, originalPos, originalPos, originalOrder );
					//-->
					</script>
					</td>
				</tr>
				<tr>
					<td valign="top" align="left">
					<?php 
        echo T_('Access Level:');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['access'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="left">
					<?php 
        echo T_('Special Access:');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['groups'] . "&nbsp;" . mosToolTip(T_('Special Access Groups'), T_('If Access Level is Special, only the selected groups will have access to the module'));
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top">
					<?php 
        echo T_('Published:');
        ?>
					</td>
					<td>
					<?php 
        echo $lists['published'];
        ?>
					</td>
				</tr>
				<tr>
					<td colspan="2">
					</td>
				</tr>
				<tr>
					<td valign="top">
					<?php 
        echo T_('ID:');
        ?>
					</td>
					<td>
					<?php 
        echo $row->id;
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top">
					<?php 
        echo T_('Description:');
        ?>
					</td>
					<td>
					<?php 
        echo $row->description;
        ?>
					</td>
				</tr>
				</table>

				<table class="adminform">
				<tr>
					<th >
					<?php 
        echo T_('Parameters');
        ?>
					</th>
				</tr>
				<tr>
					<td>
					<?php 
        echo $params->render();
        ?>
					</td>
				</tr>
				</table>
			</td>
			<td width="40%" >
				<table width="100%" class="adminform">
				<tr>
					<th>
					<?php 
        echo T_('Pages / Items');
        ?>
					</th>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Menu Item Link(s):');
        ?>
					<br />
					<?php 
        echo $lists['selections'];
        ?>
					</td>
				</tr>
				</table>
			</td>
		</tr>
		<?php 
        if ($row->module == "") {
            ?>
			<tr>
				<td colspan="2">
						<table width="100%" class="adminform">
						<tr>
							<th colspan="2">
							<?php 
            echo T_('Custom Output');
            ?>
							</th>
						</tr>
						<tr>
							<td valign="top" align="left">
							<?php 
            echo T_('Content:');
            ?>
							</td>
							<td>
							<?php 
            // parameters : areaname, content, hidden field, width, height, rows, cols
            editorArea('editor1', $row->content, 'content', '700', '350', '95', '30');
            ?>
							</td>
						</tr>
						</table>
				</td>
			</tr>
			<?php 
        }
        ?>
		</table>

		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="original" value="<?php 
        echo $row->ordering;
        ?>
" />
		<input type="hidden" name="module" value="<?php 
        echo $row->module;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="client_id" value="<?php 
        echo $lists['client_id'];
        ?>
" />
		<?php 
        if ($row->client_id || $lists['client_id']) {
            echo '<input type="hidden" name="client" value="admin" />';
        }
        ?>
		</form>
		<?php 
    }
コード例 #29
0
    /**
     * Writes the edit form for new and existing content item
     *
     * A new record is defined when <var>$row</var> is passed with the <var>id</var>
     * property set to 0.
     * @param mosContent The category object
     * @param string The html for the groups select list
     */
    function editContent(&$row, $section, &$lists, &$sectioncategories, &$images, &$params, $option, $redirect, &$menus)
    {
        global $database;
        mosMakeHtmlSafe($row);
        $nullDate = $database->getNullDate();
        $create_date = null;
        if ($row->created != $nullDate) {
            $create_date = mosFormatDate($row->created, '%A, %d %B %Y %H:%M', '0');
        }
        $mod_date = null;
        if ($row->modified != $nullDate) {
            $mod_date = mosFormatDate($row->modified, '%A, %d %B %Y %H:%M', '0');
        }
        $tabs = new mosTabs(1);
        // used to hide "Reset Hits" when hits = 0
        if (!$row->hits) {
            $visibility = "style='display: none; visibility: hidden;'";
        } else {
            $visibility = "";
        }
        mosCommonHTML::loadOverlib();
        mosCommonHTML::loadCalendar();
        ?>
		<script language="javascript" type="text/javascript">
		<!--
		var sectioncategories = new Array;
		<?php 
        $i = 0;
        foreach ($sectioncategories as $k => $items) {
            foreach ($items as $v) {
                echo "sectioncategories[" . $i++ . "] = new Array( '{$k}','" . addslashes($v->id) . "','" . addslashes($v->name) . "' );\t";
            }
        }
        ?>

		var folderimages = new Array;
		<?php 
        $i = 0;
        foreach ($images as $k => $items) {
            foreach ($items as $v) {
                echo "folderimages[" . $i++ . "] = new Array( '{$k}','" . addslashes(ampReplace($v->value)) . "','" . addslashes(ampReplace($v->text)) . "' );\t";
            }
        }
        ?>

		function submitbutton(pressbutton) {
			var form = document.adminForm;

			if ( pressbutton == 'menulink' ) {
				if ( form.menuselect.value == "" ) {
					alert( "Selecione um menu" );
					return;
				} else if ( form.link_name.value == "" ) {
					alert( "Por favor, informe um nome para este item do menu" );
					return;
				}
			}

			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}
			// assemble the images back into one field
			var temp = new Array;
			for (var i=0, n=form.imagelist.options.length; i < n; i++) {
				temp[i] = form.imagelist.options[i].value;
			}
			form.images.value = temp.join( '\n' );

			// do field validation
			if (form.title.value == ""){
				alert( "Item de conteúdo deve ter um título" );
			} else if (form.sectionid.value == "-1"){
				alert( "Você deve selecionar uma seção." );
			} else if (form.catid.value == "-1"){
				alert( "Você deve selecionar uma categoria." );
 			} else if (form.catid.value == ""){
 				alert( "Você deve selecionar uma categoria." );
			} else {
				<?php 
        getEditorContents('editor1', 'introtext');
        ?>
				<?php 
        getEditorContents('editor2', 'fulltext');
        ?>
				submitform( pressbutton );
			}
		}
		//-->
		</script>
		<form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<th class="edit">
			Itens de Conteúdo:
			<small>
			<?php 
        echo $row->id ? 'Editar' : 'Novo';
        ?>
			</small>
			<?php 
        if ($row->id) {
            ?>
				<small><small>
				[ Seção: <?php 
            echo $section;
            ?>
 ]
				</small></small>
				<?php 
        }
        ?>
			</th>
		</tr>
		</table>

		<table cellspacing="0" cellpadding="0" width="100%">
		<tr>
			<td width="60%" valign="top">
				<table width="100%" class="adminform">
				<tr>
					<td width="100%">
						<table cellspacing="0" cellpadding="0" border="0" width="100%">
						<tr>
							<th colspan="4">
							Detalhes do Item
							</th>
						</tr>
						<tr>
							<td>
							Título:
							</td>
							<td>
							<input class="text_area" type="text" name="title" size="30" maxlength="100" value="<?php 
        echo $row->title;
        ?>
" />
							</td>
							<td>
							Seção:
							</td>
							<td>
							<?php 
        echo $lists['sectionid'];
        ?>
							</td>
						</tr>
						<tr>
							<td>
							Sub-Título:
							</td>
							<td>
							<input name="title_alias" type="text" class="text_area" id="title_alias" value="<?php 
        echo $row->title_alias;
        ?>
" size="30" maxlength="100" />
							</td>
							<td>
							Categoria:
							</td>
							<td>
							<?php 
        echo $lists['catid'];
        ?>
							</td>
						</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td width="100%">
					Texto de Introdução: (necessário)
					<br /><?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor1', $row->introtext, 'introtext', '100%;', '350', '75', '20');
        ?>
					</td>
				</tr>
				<tr>
					<td width="100%">
					Texto principal: (opcional)
					<br /><?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea('editor2', $row->fulltext, 'fulltext', '100%;', '400', '75', '30');
        ?>
					</td>
				</tr>
				</table>
			</td>
			<td valign="top" width="40%">
				<?php 
        $tabs->startPane("content-pane");
        $tabs->startTab("Publicação", "publish-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					Info da Publicação
					</th>
				</tr>
				<tr>
					<td valign="top" align="right" width="120">
					Exibir na Página Inicial:
					</td>
					<td>
					<input type="checkbox" name="frontpage" value="1" <?php 
        echo $row->frontpage ? 'checked="checked"' : '';
        ?>
 />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Publicado:
					</td>
					<td>
					<input type="checkbox" name="published" value="1" <?php 
        echo $row->state ? 'checked="checked"' : '';
        ?>
 />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Nível de Acesso:
					</td>
					<td>
					<?php 
        echo $lists['access'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Apelido do Autor:
					</td>
					<td>
					<input type="text" name="created_by_alias" size="30" maxlength="100" value="<?php 
        echo $row->created_by_alias;
        ?>
" class="text_area" />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Alterar Autor:
					</td>
					<td>
					<?php 
        echo $lists['created_by'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">Ordem:</td>
					<td>
					<?php 
        echo $lists['ordering'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Alterar Data de Criação 
					</td>
					<td>
					<input class="text_area" type="text" name="created" id="created" size="25" maxlength="19" value="<?php 
        echo $row->created;
        ?>
" />
					<input name="reset" type="reset" class="button" onclick="return showCalendar('created', 'y-mm-dd');" value="..." />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Início da Publicação:
					</td>
					<td>
					<input class="text_area" type="text" name="publish_up" id="publish_up" size="25" maxlength="19" value="<?php 
        echo $row->publish_up;
        ?>
" />
					<input type="reset" class="button" value="..." onclick="return showCalendar('publish_up', 'y-mm-dd');" />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					Fim da Publicação:
					</td>
					<td>
					<input class="text_area" type="text" name="publish_down" id="publish_down" size="25" maxlength="19" value="<?php 
        echo $row->publish_down;
        ?>
" />
					<input type="reset" class="button" value="..." onclick="return showCalendar('publish_down', 'y-mm-dd');" />
					</td>
				</tr>
				</table>
				<br />
				<table class="adminform">
				<?php 
        if ($row->id) {
            ?>
					<tr>
						<td>
						<strong>ID do conteúdo:</strong>
						</td>
						<td>
						<?php 
            echo $row->id;
            ?>
						</td>
					</tr>
					<?php 
        }
        ?>
				<tr>
					<td width="120" valign="top" align="right">
					<strong>Estado:</strong>
					</td>
					<td>
					<?php 
        echo $row->state > 0 ? 'Publicado' : ($row->state < 0 ? 'Arquivado' : 'Rascunho não publicado');
        ?>
					</td>
				</tr>
				<tr >
					<td valign="top" align="right">
					<strong>
					Acessos
					</strong>:
					</td>
					<td>
					<?php 
        echo $row->hits;
        ?>
					<div <?php 
        echo $visibility;
        ?>
>
					<input name="reset_hits" type="button" class="button" value="Reiniciar Contagem" onclick="submitbutton('resethits');" />
					</div>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong>
					Revisão
					</strong>:
					</td>
					<td>
					<?php 
        echo $row->version;
        ?>
 vez(es)
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong>
					Criado
					</strong>
					</td>
					<td>
						<?php 
        if (!$create_date) {
            ?>
							Novo documento
							<?php 
        } else {
            echo $create_date;
        }
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
					<strong>
					Última Alteração
					</strong>
					</td>
					<td>
						<?php 
        if (!$mod_date) {
            ?>
							Não alterado
							<?php 
        } else {
            echo $mod_date;
            ?>
							<br />
							<?php 
            echo $row->modifier;
        }
        ?>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab("Imagens", "images-page");
        ?>
				<table class="adminform" width="100%">
				<tr>
					<th colspan="2">
						Controle do MOSImage
					</th>
				</tr>
				<tr>
					<td colspan="2">
						<table width="100%">
						<tr>
							<td width="48%" valign="top">
								<div align="center">
									Imagens na Galeria:
									<br />
									<?php 
        echo $lists['imagefiles'];
        ?>
								</div>
							</td>
							<td width="2%">
								<input class="button" type="button" value=">>" onclick="addSelectedToList('adminForm','imagefiles','imagelist')" title="Adicionar"/>
								<br />
								<input class="button" type="button" value="<<" onclick="delSelectedFromList('adminForm','imagelist')" title="Remover"/>
							</td>
							<td width="48%">
								<div align="center">
									Imagens no Artigo:
									<br />
									<?php 
        echo $lists['imagelist'];
        ?>
									<br />
									<input class="button" type="button" value="Para cima" onclick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,-1)" />
									<input class="button" type="button" value="Para baixo" onclick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,+1)" />
								</div>
							</td>
						</tr>
						</table>
						Sub-pastas: <?php 
        echo $lists['folders'];
        ?>
					</td>
				</tr>
				<tr valign="top">
					<td>
						<div align="center">
							Imagem de amostra:<br/>
							<img name="view_imagefiles" src="../images/M_images/blank.png" alt="Imagem vazia padrão" width="100" />
						</div>
					</td>
					<td valign="top">
						<div align="center">
							Imagem Ativa:<br/>
							<img name="view_imagelist" src="../images/M_images/blank.png" alt="Imagem Ativa" width="100" />
						</div>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						Edite a imagem selecionada:
						<table>
						<tr>
							<td align="right">
							Fonte:
							</td>
							<td>
							<input class="text_area" type="text" name= "_source" value="" />
							</td>
						</tr>
						<tr>
							<td align="right">
							Alinhamento:
							</td>
							<td>
							<?php 
        echo $lists['_align'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							Texto Alt:
							</td>
							<td>
							<input class="text_area" type="text" name="_alt" value="" />
							</td>
						</tr>
						<tr>
							<td align="right">
							Borda:
							</td>
							<td>
							<input class="text_area" type="text" name="_border" value="" size="3" maxlength="1" />
							</td>
						</tr>
						<tr>
							<td align="right">
							Sub-Título:
							</td>
							<td>
							<input class="text_area" type="text" name="_caption" value="" size="30" />
							</td>
						</tr>
						<tr>
							<td align="right">
							Posição do Sub-Título:
							</td>
							<td>
							<?php 
        echo $lists['_caption_position'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							Alinhamento do Sub-Título:
							</td>
							<td>
							<?php 
        echo $lists['_caption_align'];
        ?>
							</td>
						</tr>
						<tr>
							<td align="right">
							Largura Sub-Título:
							</td>
							<td>
							<input class="text_area" type="text" name="_width" value="" size="5" maxlength="5" />
							</td>
						</tr>
						<tr>
							<td colspan="2">
							<input class="button" type="button" value="Aplicar" onclick="applyImageProps()" />
							</td>
						</tr>
						</table>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab("Parâmetros", "params-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					Controle de Parâmetros
					</th>
				</tr>
				<tr>
					<td>
					Estes parâmetros somente controlam o que você vê quando clica para visualizar um item completamente
					<br /><br />
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo $params->render();
        ?>
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab("Meta dados", "metadata-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					Meta Dados
					</th>
				</tr>
				<tr>
					<td>
					Descrição:
					<br />
					<textarea class="text_area" cols="30" rows="3" style="width: 350px; height: 50px" name="metadesc"><?php 
        echo str_replace('&', '&amp;', $row->metadesc);
        ?>
</textarea>
					</td>
				</tr>
					<tr>
					<td>
					Palavras Chaves:
					<br />
					<textarea class="text_area" cols="30" rows="3" style="width: 350px; height: 50px" name="metakey"><?php 
        echo str_replace('&', '&amp;', $row->metakey);
        ?>
</textarea>
					</td>
				</tr>
				<tr>
					<td>
					<input type="button" class="button" value="Adicionar titulo Seção/Categoria/Título" onclick="f=document.adminForm;f.metakey.value=document.adminForm.sectionid.options[document.adminForm.sectionid.selectedIndex].text+', '+getSelectedText('adminForm','catid')+', '+f.title.value+f.metakey.value;" />
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->startTab("Link para o Menu", "link-page");
        ?>
				<table class="adminform">
				<tr>
					<th colspan="2">
					Link para o Menu
					</th>
				</tr>
				<tr>
					<td colspan="2">
					Isto irá criar um 'Link - Item de Conteúdo' no menu que você selecionou 
					<br /><br />
					</td>
				</tr>
				<tr>
					<td valign="top" width="90">
					Selecione um Menu
					</td>
					<td>
					<?php 
        echo $lists['menuselect'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top" width="90">
					Nome do Menu
					</td>
					<td>
					<input type="text" name="link_name" class="inputbox" value="" size="30" />
					</td>
				</tr>
				<tr>
					<td>
					</td>
					<td>
					<input name="menu_link" type="button" class="button" value="Link para o Menu" onclick="submitbutton('menulink');" />
					</td>
				</tr>
				<tr>
					<th colspan="2">
					Links de Menu Existentes
					</th>
				</tr>
				<?php 
        if ($menus == NULL) {
            ?>
					<tr>
						<td colspan="2">
						Nenhum
						</td>
					</tr>
					<?php 
        } else {
            mosCommonHTML::menuLinksContent($menus);
        }
        ?>
				<tr>
					<td colspan="2">
					</td>
				</tr>
				</table>
				<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>
			</td>
		</tr>
		</table>

		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="version" value="<?php 
        echo $row->version;
        ?>
" />
		<input type="hidden" name="mask" value="0" />
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="redirect" value="<?php 
        echo $redirect;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="images" value="" />
		<input type="hidden" name="hidemainmenu" value="0" />
		<input type="hidden" name="<?php 
        echo josSpoofValue();
        ?>
" value="1" />
		</form>
		<?php 
    }
コード例 #30
0
    function JLMS_editPlan(&$row, &$lists, $option)
    {
        JHTML::_('behavior.tooltip');
        ?>
		<script language="javascript" type="text/javascript">
		<!--
		function submitbutton(pressbutton) 
		{
			var form = document.adminForm;
			
			if ( pressbutton == 'plans' ) {
				submitform( pressbutton );
				return;
			}			
			
			if ( form.p1.value == 0 && form.p2.value != 0 )
			{
				alert('<?php 
        echo _JLMS_PLANS_TRIAL2_SPEC;
        ?>
');
				return false;
			}
			
			if ( form.p3.value == 0 )
			{
				alert("<?php 
        echo _JLMS_PLANS_REG_PERIOD_REQ;
        ?>
");
				return false;
			}		
			
			if( trim(form.name.value)  == '' ) {			
				alert('<?php 
        echo _JLMS_PLANS_ENTER_P_NAME;
        ?>
');
			} else {
				submitform( pressbutton );
			}
			
			return true;			
		}
		
		<?php 
        if (JLMS_J16version()) {
            ?>
		Joomla.submitbutton = submitbutton;
		<?php 
        }
        ?>
		
		function trim( value ) {
			return value.replace(/(^\s+)|(\s+$)/g, "");
		}
		//-->
		</script>
		
		<form action="index.php" method="post" name="adminForm">		
		<table width="100%" >
			<tr>
				<td valign="top" width="220">
				<div>
					<?php 
        echo joomla_lms_adm_html::JLMS_menu();
        ?>
				</div>
				</td>
				<td valign="top">
				<div class="width-100">
				<fieldset class="adminform">
				<?php 
        if (!class_exists('JToolBarHelper')) {
            ?>
					<table class="adminheading" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<th class="categories">
						<?php 
            echo _JOOMLMS_COMP_NAME;
            ?>
: <small><?php 
            echo $row->id ? _JLMS_PLANS_EDIT_PLAN : _JLMS_PLANS_NEW_PLAN;
            ?>
</small>
						</th>
					</tr>
					</table>
				<?php 
        }
        ?>
				
				<table width="100%" >
				<tr><th colspan="2"><?php 
        echo _JLMS_PLANS_PLAN_DETS;
        ?>
</th></tr>
				<tr><td width="20%" align="right"><?php 
        echo _JLMS_NAME;
        ?>
:</td>
					<td><input class="inputbox" type="text" name="name" size="50" maxlength="100" value="<?php 
        echo $row->name;
        ?>
" /></td>
				</tr>
<input class="inputbox" type="hidden" name="params" size="10" maxlength="100" value="<?php 
        echo $row->params;
        ?>
" />
				<tr><td align="right" colspan="2"><?php 
        echo _JLMS_DESCRIPTION;
        ?>
:
					<br /><?php 
        editorArea('editor1', $row->description, 'description', '100%;', '250', '75', '30');
        ?>
					</td>
				</tr>
				<tr><td colspan="2">&nbsp;</td></tr>
				</table>
				
				<div  style="float:left;width:50%">
				<table width="100%" >
					<tr><th colspan="2"><?php 
        echo _JLMS_PLANS_PAY_PERIOD_SET;
        ?>
:</th></tr>
					<tr><td width="180"><?php 
        echo _JLMS_PLANS_PERIOD1_LENGTH;
        ?>
:</td>
						<td><input class="inputbox" type="text" name="p1" size="10" maxlength="10" value="<?php 
        echo $row->p1;
        ?>
" />&nbsp;&nbsp;<?php 
        echo mosToolTip(_JLMS_PLANS_TIP_TRIAL_1_PAY);
        ?>
</td>
					</tr>	
					<tr><td width="180"><?php 
        echo _JLMS_PLANS_PERIOD2_LENGTH;
        ?>
:</td>
						<td><input class="inputbox" type="text" name="p2" size="10" maxlength="10" value="<?php 
        echo $row->p2;
        ?>
" />&nbsp;&nbsp;<?php 
        echo mosToolTip(_JLMS_PLANS_TIP_TRIAL_2_PAY);
        ?>
</td>
					</tr>				
					<tr><td width="180"><?php 
        echo _JLMS_PLANS_REG_PERIOD_LENGTH;
        ?>
:</td>
						<td><input class="inputbox" type="text" name="p3" size="10" maxlength="10" value="<?php 
        echo $row->p3;
        ?>
" />&nbsp;&nbsp;<?php 
        echo mosToolTip(_JLMS_PLANS_TIP_REGULAR_PAY);
        ?>
</td>
					</tr>						
					<tr><td colspan="2">&nbsp;</td></tr>					
				</table>
				</div> 

				<div  style="float:right;width:50%">
				<table width="100%" >
					<tr><th colspan="2"><?php 
        echo _JLMS_PLANS_RECURR_OPT;
        ?>
</th></tr>				
					<tr><td width="180"><?php 
        echo _JLMS_PLANS_RECR_TIMES;
        ?>
:</td>
						<td><input class="inputbox" type="text" name="srt" size="10" maxlength="10" value="<?php 
        echo $row->srt;
        ?>
" />&nbsp;&nbsp;<?php 
        echo mosToolTip(_JLMS_PLANS_TIP_RECR_TIMES);
        ?>
</td>
					</tr>									
					<tr><td colspan="2">&nbsp;</td></tr>
				</table>								
				</div>

				<div style="clear:both "></div>	
				
				<table width="100%" >
					<tr><th colspan="2"><?php 
        echo _JLMS_PLANS_PUBLISH_INF;
        ?>
</th></tr>
					<tr><td width="180"><?php 
        echo _JLMS_PUBLISHED;
        ?>
:</td>
						<td>
						<fieldset class="radio">
						<?php 
        echo $lists['published'];
        ?>
						</fieldset>
						</td>
					</tr>
					<tr><td colspan="2">&nbsp;</td></tr>
				</table>
				</fieldset>
				</div>
			</td>
		</tr>
		</table>	
		
		<input type="hidden" name="t1" value="D"/>
		<input type="hidden" name="t2" value="D"/>
		<input type="hidden" name="t3" value="D"/>
		<input type="hidden" name="sra" value="1"/>
		<input type="hidden" name="src" value="1"/>
		
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="task" value="" />		
		</form>
		<?php 
    }