public function EditGalleries() { global $langmessage; $this->page->head_js[] = '/include/js/special_galleries.js'; $this->page->css_admin[] = '/include/css/edit_gallery.css'; echo '<h2>'; echo \gp\tool::Link('Special_Galleries', \gp\tool\Output::ReturnText('galleries')); echo ' » ' . $langmessage['administration']; echo '</h2>'; echo '<p>'; echo $langmessage['DRAG-N-DROP-DESC2']; echo '</p>'; $this->EditableArea(); }
function __construct($args) { global $langmessage, $config; parent::__construct($args); /* An xml site map will not show any of the pages from dynamic add-ons ... which is precisely what the regular sitemap shows */ if (isset($_GET['xml'])) { $this->xml(); return; } $this->MultiSiteData(); echo '<div class="sitemap_xml">'; echo \gp\tool::Link('Special_Site_Map', 'XML', 'xml'); echo '</div>'; echo '<h2>'; echo \gp\tool\Output::ReturnText('site_map'); echo '</h2>'; \gp\tool\Output::GetFullMenu(); }
public function ShowForm() { global $langmessage, $config; $attr = ''; if ($this->sent) { $attr = ' readonly="readonly" '; } $_GET += array('name' => '', 'email' => '', 'subject' => '', 'message' => ''); $_POST += array('name' => $_GET['name'], 'email' => $_GET['email'], 'subject' => $_GET['subject'], 'message' => $_GET['message']); $require_email =& $config['require_email']; echo '<form class="contactform" action="' . \gp\tool::GetUrl($this->page->title) . '" method="post">'; //nonce fields echo '<div style="display:none !important">'; echo '<input type="hidden" name="contact_nonce" value="' . htmlspecialchars(\gp\tool::new_nonce('contact_post', true)) . '" />'; echo '<input type="text" name="contact_void" value="" />'; echo '</div>'; echo '<label for="contact_name"><span class="title">'; echo \gp\tool\Output::ReturnText('your_name'); echo '</span><input id="contact_name" class="input text" type="text" name="name" value="' . htmlspecialchars($_POST['name']) . '" ' . $attr . ' />'; echo '</label>'; echo '<label for="contact_email"><span class="title">'; echo \gp\tool\Output::ReturnText('your_email'); if (strpos($require_email, 'email') !== false) { echo '*'; } echo '</span><input id="contact_email" class="input text" type="text" name="email" value="' . htmlspecialchars($_POST['email']) . '" ' . $attr . '/>'; echo '</label>'; echo '<label for="contact_subject"><span class="title">'; echo \gp\tool\Output::ReturnText('subject'); if (strpos($require_email, 'none') === false) { echo '*'; } echo '</span><input id="contact_subject" class="input text" type="text" name="subject" value="' . htmlspecialchars($_POST['subject']) . '" ' . $attr . '/>'; echo '</label>'; echo '<label for="contact_message">'; echo \gp\tool\Output::ReturnText('message'); if (strpos($require_email, 'none') === false) { echo '*'; } echo '</label>'; echo '<textarea id="contact_message" name="message" ' . $attr . ' rows="10" cols="10">'; echo htmlspecialchars($_POST['message']); echo '</textarea>'; \gp\tool\Plugins::Action('contact_form_pre_captcha'); if (!$this->sent && \gp\tool\Recaptcha::isActive()) { echo '<div class="captchaForm">'; echo \gp\tool\Output::ReturnText('captcha'); \gp\tool\Recaptcha::Form(); echo '</div>'; } if ($this->sent) { echo \gp\tool\Output::ReturnText('message_sent', '%s', 'message_sent'); } else { echo '<input type="hidden" name="cmd" value="gp_send_message" />'; $key = 'send_message'; $text = \gp\tool\Output::SelectText($key); if (\gp\tool\Output::ShowEditLink('Admin_Theme_Content')) { $query = 'cmd=EditText&key=' . urlencode($key); echo \gp\tool\Output::EditAreaLink($edit_index, 'Admin_Theme_Content', $langmessage['edit'], $query, ' title="' . $key . '" data-cmd="gpabox" '); echo '<input type="submit" class="submit editable_area" id="ExtraEditArea' . $edit_index . '" name="aaa" value="' . $text . '" />'; } else { echo '<input type="submit" class="submit" name="aaa" value="' . $text . '" />'; } } echo '</form>'; }
public function GenerateOutput() { global $langmessage; \gp\tool::ShowingGallery(); echo '<h2>'; echo \gp\tool\Output::ReturnText('galleries'); echo '</h2>'; $wrap = \gp\admin\Tools::CanEdit($this->page->gp_index); if ($wrap) { echo \gp\tool\Output::EditAreaLink($edit_index, 'Admin/Galleries', $langmessage['edit']); echo '<div class="editable_area cf" id="ExtraEditArea' . $edit_index . '">'; // class="edit_area" added by javascript } $image_text = \gp\tool\Output::ReturnText('image'); $images_text = \gp\tool\Output::ReturnText('images'); $list = ''; $shown = 0; foreach ($this->galleries as $title => $info) { //page is hidden if (!$this->GalleryVisible($title, $info)) { continue; } $count = ''; if (is_array($info)) { $icon = $info['icon']; if ($info['count'] == 1) { $count = $info['count'] . ' ' . \gp\tool\Output::ReturnText('image'); } elseif ($info['count'] > 1) { $count = $info['count'] . ' ' . \gp\tool\Output::ReturnText('images'); } } else { $icon = $info; } if (empty($icon)) { continue; } $icon = rawurldecode($icon); //prevent double encoding if (strpos($icon, '/thumbnails/') === false) { $thumbPath = \gp\tool::GetDir('/data/_uploaded/image/thumbnails' . $icon . '.jpg'); } else { $thumbPath = \gp\tool::GetDir('/data/_uploaded' . $icon); } $label = \gp\tool::GetLabel($title); $title_attr = ' title="' . \gp\tool::GetBrowserTitle($title) . '"'; $label_img = ' <img src="' . $thumbPath . '" alt=""/>'; $list .= '<li>' . \gp\tool::Link($title, $label_img, '', $title_attr) . '<div>' . \gp\tool::Link($title, $label, '', $title_attr) . '<p>' . $count . '</p>' . '</div>' . '</li>'; } if (!empty($list)) { echo '<ul class="gp_gallery gp_galleries">'; echo $list; echo '</ul>'; } if ($wrap) { echo '</div>'; } $this->PostSave(); }