<?php endif; ?> /> <?php endif; ?> <?php endif; ?> </p> </form> </div> <div class="col-lg-2"> <div> <?php eT("Other files:"); ?> <?php echo CHtml::form(array('admin/templates/sa/templatefiledelete'), 'post'); ?> <select size='11' style='width:250px; overflow: hidden;' name='otherfile' id='otherfile'> <?php echo makeoptions($otherfiles, "name", "name", ""); ?> </select><br> <?php if (Permission::model()->hasGlobalPermission('templates','delete')) { ?> <input type='submit' class='btn btn-default' value='<?php eT("Delete"); ?>' onclick="javascript:return confirm('<?php eT("Are you sure you want to delete this file?","js"); ?>')"/> <?php } ?> <input type='hidden' name='screenname' value='<?php echo HTMLEscape($screenname); ?>' /> <input type='hidden' name='templatename' value='<?php echo $templatename; ?>' /> <input type='hidden' name='editfile' value='<?php echo $editfile; ?>' /> <input type='hidden' name='action' value='templatefiledelete' /> </form> </div>
</div> <!-- Right Menu --> <div class="col-md-7 text-right form-inline"> <div class="form-group"> <label for='templatedir'><?php eT("Template:"); ?></label> <select class="listboxtemplates form-control" id='templatedir' name='templatedir' onchange="javascript: window.open('<?php echo $this->createUrl("admin/templates/sa/view/editfile/".$editfile."/screenname/".$screenname); ?>/templatename/'+escape(this.value), '_top')"> <?php echo templateoptions($templates, $templatename); ?> </select> </div> <div class="form-group"> <label for='listboxtemplates'><?php eT("Screen:"); ?></label> <select class="listboxtemplates form-control" id='listboxtemplates' name='screenname' onchange="javascript: window.open('<?php echo $this->createUrl("admin/templates/sa/screenredirect/editfile/".$editfile."/templatename/".$templatename); ?>/screenname/'+escape(this.value), '_top')"> <?php echo makeoptions($screens, "id", "name", HTMLEscape($screenname) ); ?> </select> </div> <?php if(isset($fullpagebar['savebutton']['form'])):?> <a class="btn btn-success" href="#" role="button" id="save-form-button" data-form-id="<?php echo $fullpagebar['savebutton']['form']; ?>"> <span class="glyphicon glyphicon-ok" ></span> <?php eT("Save");?> </a> <?php endif;?> <!-- Close --> <?php if(isset($fullpagebar['closebutton']['url'])):?> <a class="btn btn-danger" href="<?php echo $fullpagebar['closebutton']['url']; ?>" role="button"> <span class="glyphicon glyphicon-close" ></span> <?php eT("Close");?>
if ($editfile) { $templatesoutput .= textarea_encode(filetext($templatename, $editfile)); } $templatesoutput .= "</textarea><br />\n"; if (is_writable($templates[$templatename])) { $templatesoutput .= "<input align='right' type='submit' value='" . $clang->gT("Save Changes") . "'"; if (!is_template_editable($templatename)) { $templatesoutput .= " disabled='disabled' alt='" . $clang->gT("Changes cannot be saved to a standard template.") . "'"; } $templatesoutput .= " />"; } else { $templatesoutput .= '<span class="flashmessage">' . $clang->gT("You can't save changes because the template directory is not writable.") . '</span>'; } $templatesoutput .= "<br />\n" . "</form></td>"; $templatesoutput .= "<th class='subheader' colspan='2' align='right' width='200'>" . $clang->gT("Other Files:") . "</th></tr>\n"; $templatesoutput .= "<tr><td valign='top' rowspan='2' class='subheader'><select size='6' name='editfile' onchange='javascript: window.open(\"admin.php?action=templates&templatename={$templatename}&screenname=" . urlencode($screenname) . "&editfile=\"+escape(this.value), \"_top\")'>\n" . makeoptions($files, "name", "name", $editfile) . "</select><br /><br/>\n" . $clang->gT("CSS & Javascript files:") . "<br/><select size='8' name='cssfiles' onchange='javascript: window.open(\"admin.php?action=templates&templatename={$templatename}&screenname=" . urlencode($screenname) . "&editfile=\"+escape(this.value), \"_top\")'>\n" . makeoptions($cssfiles, "name", "name", $editfile) . "</select>\n" . "</td>\n" . "<td valign='top' align='right' width='20%'><form action='admin.php' method='post'>" . "<table width='90' align='left' border='0' cellpadding='0' cellspacing='0'>\n<tr><td></td></tr>" . "<tr><td><select size='11' style='min-width:130px;' name='otherfile' id='otherfile'>\n" . makeoptions($otherfiles, "name", "name", "") . "</select>" . "</td></tr>" . "<tr><td>" . "<input type='submit' value='" . $clang->gT("Delete") . "' onclick=\"javascript:return confirm('" . $clang->gT("Are you sure you want to delete this file?", "js") . "')\""; if (!is_template_editable($templatename)) { $templatesoutput .= " style='color: #BBBBBB;' disabled='disabled' alt='" . $clang->gT("Files in a standard template cannot be deleted.") . "'"; } $templatesoutput .= " />\n" . "<input type='hidden' name='screenname' value='" . html_escape($screenname) . "' />\n" . "<input type='hidden' name='templatename' value='{$templatename}' />\n" . "<input type='hidden' name='action' value='templatefiledelete' />\n" . "</td></tr></table></form></td>\n" . "</tr>\n" . "<tr>" . "<td valign='top'>" . "<form enctype='multipart/form-data' name='importtemplatefile' action='admin.php' method='post' onsubmit='return checkuploadfiletype(this.the_file.value);'>\n" . "<table><tr> <th class='subheader' valign='top' style='border: solid 1 #000080'>\n" . $clang->gT("Upload a file:") . "</th></tr><tr><td><input name=\"the_file\" type=\"file\" size=\"30\" /><br />" . "<input type='submit' value='" . $clang->gT("Upload") . "'"; if (!is_template_editable($templatename)) { $templatesoutput .= " disabled='disabled'"; } $templatesoutput .= " />\n" . "<input type='hidden' name='editfile' value='{$editfile}' />\n" . "<input type='hidden' name='screenname' value='" . html_escape($screenname) . "' />\n" . "<input type='hidden' name='templatename' value='{$templatename}' />\n" . "<input type='hidden' name='action' value='templateuploadfile' />\n" . "</td></tr></table></form>\n" . "</td>\n" . "\t</tr>\n" . "</table>"; } //SAMPLE ROW $templatesoutput .= "\t<div class='header ui-widget-header'>\n" . "\t<strong>" . $clang->gT("Preview:") . "</strong>\n" . "\t<input type='button' value='iPhone' id='iphone' />\n" . "\t<input type='button' value='640x480' id='x640' />\n" . "\t<input type='button' value='800x600' id='x800' />\n" . "\t<input type='button' value='1024x768' id='x1024' />\n" . "\t<input type='button' value='" . $clang->gt("Full") . "' id='full' />\n" . "</div>\n" . "<div style='width:90%; margin:0 auto;'>\n"; // The following lines are forcing the browser to refresh the templates on each save $time = date("ymdHis"); @($fnew = fopen("{$tempdir}/template_temp_{$time}.html", "w+")); if (!$fnew) {