function EditGalleries() { global $page, $langmessage; $page->head_js[] = '/include/js/special_galleries.js'; $page->css_admin[] = '/include/css/edit_gallery.css'; echo '<h2>'; echo common::Link('Special_Galleries', gpOutput::ReturnText('galleries')); echo ' » ' . $langmessage['administration']; echo '</h2>'; echo '<p>'; echo $langmessage['DRAG-N-DROP-DESC2']; echo '</p>'; $this->EditableArea(); }
function special_map() { global $page, $langmessage, $config; /* 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 common::Link('Special_Site_Map', 'XML', 'xml'); echo '</div>'; echo '<h2>'; echo gpOutput::ReturnText('site_map'); echo '</h2>'; gpOutput::GetFullMenu(); }
static function GetAddonText($key, $html = '%s', $wrapper_class = '') { global $addonFolderName; if (!$addonFolderName) { return gpOutput::ReturnText($key, $html, $wrapper_class); } $query = 'cmd=addontext&addon=' . urlencode($addonFolderName) . '&key=' . urlencode($key); return gpOutput::ReturnTextWorker($key, $html, $query, $wrapper_class); }
/** * Display the visitor form for adding comments * */ public function CommentForm() { if ($this->comments_closed) { echo '<div class="comments_closed">'; echo gpOutput::GetAddonText('Comments have been closed.'); echo '</div>'; return; } if ($this->comment_saved) { return; } $_POST += array('name' => '', 'website' => 'http://', 'comment' => ''); echo '<h3>'; echo gpOutput::GetAddonText('Leave Comment'); echo '</h3>'; echo '<form method="post" action="' . SimpleBlogCommon::PostUrl($this->post_id) . '">'; echo '<ul>'; //name echo '<li>'; echo '<label>'; echo gpOutput::GetAddonText('Name'); echo '</label><br/>'; echo '<input type="text" name="name" class="text" value="' . htmlspecialchars($_POST['name']) . '" />'; echo '</li>'; //website if (!empty(SimpleBlogCommon::$data['commenter_website'])) { echo '<li>'; echo '<label>'; echo gpOutput::GetAddonText('Website'); echo '</label><br/>'; echo '<input type="text" name="website" class="text" value="' . htmlspecialchars($_POST['website']) . '" />'; echo '</li>'; } //comment echo '<li>'; echo '<label>'; echo gpOutput::ReturnText('Comment'); echo '</label><br/>'; echo '<textarea name="comment" cols="30" rows="7" >'; echo htmlspecialchars($_POST['comment']); echo '</textarea>'; echo '</li>'; //recaptcha if (SimpleBlogCommon::$data['comment_captcha'] && gp_recaptcha::isActive()) { echo '<input type="hidden" name="anti_spam_submitted" value="anti_spam_submitted" />'; echo '<li>'; echo '<label>'; echo gpOutput::ReturnText('captcha'); echo '</label><br/>'; gp_recaptcha::Form(); echo '</li>'; } //submit button echo '<li>'; echo '<input type="hidden" name="cmd" value="Add Comment" />'; $html = '<input type="submit" name="" class="submit" value="%s" />'; echo gpOutput::GetAddonText('Add Comment', $html); echo '</li>'; echo '</ul>'; echo '</form>'; }
function GenerateOutput() { global $langmessage, $page; common::ShowingGallery(); echo '<h2>'; echo gpOutput::ReturnText('galleries'); echo '</h2>'; includeFile('admin/admin_tools.php'); $wrap = admin_tools::CanEdit($page->gp_index); if ($wrap) { echo gpOutput::EditAreaLink($edit_index, 'Special_Galleries', $langmessage['edit'], 'cmd=edit'); echo '<div class="editable_area cf" id="ExtraEditArea' . $edit_index . '">'; // class="edit_area" added by javascript } $image_text = gpOutput::ReturnText('image'); $images_text = gpOutput::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'] . ' ' . gpOutput::ReturnText('image'); } elseif ($info['count'] > 1) { $count = $info['count'] . ' ' . gpOutput::ReturnText('images'); } } else { $icon = $info; } if (empty($icon)) { continue; } if (strpos($icon, '/thumbnails/') === false) { $thumbPath = common::GetDir('/data/_uploaded/image/thumbnails' . $icon . '.jpg'); } else { $thumbPath = common::GetDir('/data/_uploaded' . $icon); } $label = common::GetLabel($title); $title_attr = ' title="' . common::GetBrowserTitle($title) . '"'; $label_img = ' <img src="' . $thumbPath . '" alt=""/>'; $list .= '<li>' . common::Link($title, $label_img, '', $title_attr) . '<div>' . common::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(); }
function GetText($key, $html = '%s') { echo gpOutput::ReturnText($key, $html); }
function ShowForm() { global $page, $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="' . common::GetUrl($page->title) . '" method="post">'; //nonce fields echo '<div style="display:none !important">'; echo '<input type="hidden" name="contact_nonce" value="' . htmlspecialchars(common::new_nonce('contact_post', true)) . '" />'; echo '<input type="text" name="contact_void" value="" />'; echo '</div>'; echo '<label for="contact_name"><span class="title">'; echo gpOutput::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 gpOutput::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 gpOutput::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 gpOutput::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>'; gpPlugin::Action('contact_form_pre_captcha'); if (!$this->sent && gp_recaptcha::isActive()) { echo '<div class="captchaForm">'; echo gpOutput::ReturnText('captcha'); gp_recaptcha::Form(); echo '</div>'; } if ($this->sent) { echo gpOutput::ReturnText('message_sent', '%s', 'message_sent'); } else { echo '<input type="hidden" name="cmd" value="gp_send_message" />'; $key = 'send_message'; $text = gpOutput::SelectText($key); if (gpOutput::ShowEditLink('Admin_Theme_Content')) { $query = 'cmd=edittext&key=' . urlencode($key); echo gpOutput::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>'; }