function Load_TextDomain() { $this->text_domain = get_class($this); $lang_file = DirName(__FILE__) . '/donate_' . get_locale() . '.mo'; if (Is_File($lang_file)) { load_textdomain($this->text_domain, $lang_file); } }
static function Init($plugin_file) { self::$plugin_file = $plugin_file; self::$plugin_folder = DirName(self::$plugin_file); self::loadBaseURL(); Register_Activation_Hook(self::$plugin_file, array(__CLASS__, 'installPlugin')); Add_Action('loop_start', array(__CLASS__, 'printPrefixFilter')); Add_Filter('the_content', array(__CLASS__, 'filterContent')); }
public function Add_Options_Page() { $handle = Add_Options_Page($this->t('Fancy Gallery Options'), $this->t('Fancy Gallery'), 'manage_options', __CLASS__, array($this, 'Print_Options_Page')); # Add JavaScript to this handle Add_Action('load-' . $handle, array($this, 'Load_Options_Page')); # Add option boxes $this->Add_Option_Box($this->t('Lightbox'), DirName(__FILE__) . '/options-page/lightbox.php'); $this->Add_Option_Box($this->t('Templates'), DirName(__FILE__) . '/options-page/templates.php', 'main', 'closed'); $this->Add_Option_Box($this->t('User rights'), DirName(__FILE__) . '/options-page/user-rights.php', 'main', 'closed'); $this->Add_Option_Box($this->t('Taxonomies'), DirName(__FILE__) . '/options-page/taxonomies.php', 'side'); $this->Add_Option_Box($this->t('Gallery "Excerpts"'), DirName(__FILE__) . '/options-page/excerpt.php', 'side'); $this->Add_Option_Box($this->t('Archive Url'), DirName(__FILE__) . '/options-page/archive-link.php', 'side'); }
function __construct($plugin_file) { self::$plugin_file = $plugin_file; self::$plugin_folder = DirName(self::$plugin_file); # Read base $this->Load_Base_Url(); # Template directory $this->template_dir = WP_CONTENT_DIR . '/fancy-gallery-templates'; # Helper classes #I18n::Load_TextDomain(); $this->options = new Options($this); $this->gallery_post_type = new Gallery_Post_Type($this); if ($this->options->Get('lightbox') == 'on') { $this->lightbox = new Lightbox($this); } $this->mocking_bird = new Mocking_Bird($this); # This Plugin supports post thumbnails Add_Theme_Support('post-thumbnails'); # Set Hooks Register_Activation_Hook(self::$plugin_file, array($this, 'Plugin_Activation')); Add_Filter('the_content', array($this, 'Filter_Content'), 11); Add_Filter('the_content_feed', array($this, 'Filter_Feed_Content')); Add_Filter('the_excerpt_rss', array($this, 'Filter_Feed_Content')); Add_Action('wp_enqueue_scripts', array($this, 'Enqueue_Frontend_Scripts')); Add_Action('widgets_init', array($this, 'Register_Widgets')); Add_Filter('post_class', array($this, 'Filter_Post_Class')); Add_Action('pre_get_posts', array($this, 'Filter_Attachment_Query')); Add_Filter('get_the_categories', array($this, 'Filter_Get_The_Categories')); Add_Filter('the_category', array($this, 'Filter_The_Category'), 10, 3); Add_Filter('get_the_tags', array($this, 'Filter_Get_The_Tags')); Add_Filter('the_tags', array($this, 'Filter_The_Tags'), 10, 5); Add_ShortCode('gallery', array($this, 'ShortCode_Gallery')); if (!$this->options->Get('disable_excerpts')) { Add_Filter('get_the_excerpt', array($this, 'Filter_Excerpt'), 9); } # Add to GLOBALs $GLOBALS[__CLASS__] = $this; }
} #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- if (Set_Error_Handler('__Error_Handler__') === FALSE) { exit('Не удалось установить перехват ошибок'); } #******************************************************************************# # НАСТРОЙКА СРЕДЫ ВЫПОЛНЕНИЯ #******************************************************************************# $PATH = isset($_ENV['PATH']) ? $_ENV['PATH'] : ''; #------------------------------------------------------------------------------- $PATH = SPrintF('%s:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:%s:%s:%s', $PATH, SYSTEM_PATH, DirName(SYSTEM_PATH), DirName(DirName(SYSTEM_PATH))); #------------------------------------------------------------------------------- if (!PutENV(SPrintF('PATH=%s', $PATH))) { $GLOBALS['__MESSAGES'][] = '[JBs core]: не удалось установить переменную окружения PATH'; } #------------------------------------------------------------------------------- Debug(SPrintF('[JBs core]: PATH=(%s)', $PATH)); #------------------------------------------------------------------------------- unset($PATH); #------------------------------------------------------------------------------- #******************************************************************************# # ЗАГРУЗКА ХОСТА #******************************************************************************# $HOST_CONF = @Parse_Ini_File($Path = SPrintF('%s/hosts/%s/host.ini', SYSTEM_PATH, HOST_ID)); if (!$HOST_CONF) { exit(SPrintF('[JBs core]: ошибка загрузки конфигурации хоста (%s)', $Path));
function Load_TextDomain() { $this->text_domain = get_class($this); load_textdomain($this->text_domain, DirName(__FILE__) . '/language/' . get_locale() . '.mo'); }
Author URI: http://DennisHoppe.de */ if (Version_Compare(PHP_VERSION, '5.3.0', '<')) { # Add PHP Version warning to the dashboard Add_Action('admin_notices', 'Fancy_Gallery_PHP53_Version_Warning'); function Fancy_Gallery_PHP53_Version_Warning() { ?> <div class="error"> <p><?php PrintF('<strong>%1$s:</strong> You need at least <strong>PHP 5.3</strong> or higher to use %1$s. You have PHP %2$s installed. Please ask your hoster for an upgrade.', 'Fancy Gallery', PHP_VERSION); ?> </p> </div><?php } } else { # Load core classes include DirName(__FILE__) . '/class.core.php'; include DirName(__FILE__) . '/class.gallery-post-type.php'; include DirName(__FILE__) . '/class.lightbox.php'; include DirName(__FILE__) . '/class.i18n.php'; include DirName(__FILE__) . '/class.mocking-bird.php'; include DirName(__FILE__) . '/class.options.php'; include DirName(__FILE__) . '/class.wpml.php'; # Load widgets include DirName(__FILE__) . '/widget.random-images.php'; include DirName(__FILE__) . '/widget.taxonomies.php'; include DirName(__FILE__) . '/widget.taxonomy-cloud.php'; # Inititalize Plugin eval('New WordPress\\Plugin\\Fancy_Gallery\\Core(__FILE__);'); }
<?php $_SERVER['DOCUMENT_ROOT'] = DirName(__FILE__); $_SERVER['DOCUMENT_ROOT'] = SubStr($_SERVER['DOCUMENT_ROOT'], 0, StrLen($_SERVER['DOCUMENT_ROOT']) - StrLen("/bitrix/modules/mail")); define('NOT_CHECK_PERMISSIONS', true); define('BX_BUFFER_USED', false); define("BX_NO_ACCELERATOR_RESET", true); ob_start(); //This will prevent warning: cannot modify header information require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php'; ob_end_clean(); if (!CModule::IncludeModule('mail')) { die('Mail module is not installed'); } CSMTPServer::Run(); require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/epilog_after.php';
<?php /* Fancy Gallery Template: Thumbnails / Image Title with Share buttons Description: This template displays the thumbnail images and the image title with share buttons. Version: 1.0.1 Author: Dennis Hoppe Author URI: http://DennisHoppe.de */ // Read base url $base_url = SPrintF('%s/%s', Get_Bloginfo('wpurl'), SubStr(RealPath(DirName(__FILE__)), Strlen(ABSPATH))); $base_url = Str_Replace("\\", '/', $base_url); // Windows Workaround ?> <div class="gallery fancy-gallery <?php echo BaseName(__FILE__, '.php'); ?> " id="gallery_<?php echo $this->gallery->id; ?> "><?php foreach ($this->gallery->images as $image) { // Build <img> Tags $img_code = '<img'; foreach ($image->attributes as $attribute => $value) { $img_code .= SPrintF(' %s="%s"', $attribute, HTMLSpecialChars(Strip_Tags($value))); } $img_code .= '>'; // Build FB share button $fb_code = SPrintF('<a href="%1$s" title="%2$s" class="%3$s" target="_blank">%4$s</a>', SPrintF('https://www.facebook.com/sharer/sharer.php?u=%s', $image->href), HTMLSpecialChars($image->title), $this->gallery->attributes->link_class, SPrintF('<img src="%s/facebook-button.png" alt="Share it" height="20">', $base_url)); // Build Pintarest share button
ImageColorTransparent($image_resized, $transparency); } elseif ($image_type == IMAGETYPE_PNG) { ImageAlphaBlending($image_resized, false); $color = ImageColorAllocateAlpha($image_resized, 0, 0, 0, 127); ImageFill($image_resized, 0, 0, $color); ImageSaveAlpha($image_resized, true); } } ImageCopyResampled($image_resized, $image, 0, 0, 0, 0, $final_width, $final_height, $width_old, $height_old); // Writing image switch ($image_type) { case IMAGETYPE_GIF: imagegif($image_resized, $dst); break; case IMAGETYPE_JPEG: imagejpeg($image_resized, $dst, 85); break; case IMAGETYPE_PNG: imagepng($image_resized, $dst); break; default: return false; } } } /* End of the Class */ new wp_plugin_auto_resize_uploaded_images(); require_once DirName(__FILE__) . '/contribution.php'; } /* End of the If-Class-Exists-Condition */ /* End of File */
?> "><input type="text" name="folder"><input type="submit" value="Create"></p></form></body></html><?php } elseif ($filebrowser->action == 'getfile') { Header('Status: 200'); Header('Content-Type: application/' . PathInfo($filebrowser->file, PATHINFO_EXTENSION)); Header(SPrintF('Content-Disposition: attachment; filename="%s"', BaseName($filebrowser->file))); Header('Content-Length:' . FileSize($filebrowser->file)); ReadFile($filebrowser->file); exit; } elseif ($filebrowser->action == 'delfile') { Unlink($filebrowser->file); Header('Status: 307'); Header('Location: ' . $filebrowser->build_link('browse', DirName($filebrowser->file))); exit; } elseif ($filebrowser->action == 'uploadfile') { Copy($_FILES['file']['tmp_name'], $filebrowser->directory . $_FILES['file']['name']); Header('Status: 307'); Header('Location: ' . $filebrowser->build_link('browse', $filebrowser->directory)); exit; } elseif ($filebrowser->action == 'createfolder') { $new_folder = $filebrowser->directory . Trim($_REQUEST['folder']); MKDir($new_folder, 0777, True); Header('Status: 307'); Header('Location: ' . $filebrowser->build_link('browse', $filebrowser->directory)); exit; } elseif ($filebrowser->action == 'delfolder') { $filebrowser->delete_folder($filebrowser->directory); Header('Status: 307'); Header('Location: ' . $filebrowser->build_link('browse', DirName($filebrowser->directory))); exit; }
function Print_Contribution_Message() { if (Count($this->Get_Extension_Names()) == 0) { return False; } global $current_user; get_currentuserinfo(); $arr_extension = $this->Get_Extension_Names(); if (File_Exists(DirName(__FILE__) . '/contribution.png')) { ?> <img src="<?php echo $this->base_url; ?> /contribution.png" class="alignright" style="margin-left:10px" /> <?php } ?> <div style="text-align:justify"> <?php if ($this->is_dashboard) { ?> <h4><?php } else { ?> <h3><?php } ?> <?php PrintF($this->t('Hello %1$s!'), $current_user->display_name); ?> </h4> <?php if ($this->is_dashboard) { ?> </h4><?php } else { ?> </h3><?php } ?> <?php if (Count($arr_extension) == 1) { ?> <p> <?php PrintF($this->t('Thank you for using my WordPress plugin %s.'), $arr_extension[0]); ?> <?php echo $this->t('I am sure you will enjoy the new features and you will surely find out fast that this plugin is very useful for you.'); ?> <p> <p> <?php echo $this->t('You can use and test it without any limitation of functionality or availability for your personal purposes.'); ?> </p> <?php } else { ?> <p> <?php PrintF($this->t('Thank you for using %1$s of my WordPress plugins: %2$s.'), $this->Number_to_Word(Count($arr_extension)), $this->Extended_Implode($arr_extension, ', ', ' ' . $this->t('and') . ' ')); ?> <?php echo $this->t('I am sure you will enjoy the new features and you will surely find out fast that these plugins are very useful for you.'); ?> </p> <p> <?php echo $this->t('You can use and test these plugins without any limitation of functionality or availability for your personal purposes.'); ?> </p> <?php } ?> <p> <?php echo $this->t('But please make a contribution in order to support that my plugins can be developed further more.'); ?> <small><?php echo $this->t('... <em>and to remove this Notification!</em>'); ?> </small> </p> <p> (<small><?php PrintF($this->t('If you have already donated in the past and lost your voucher please %sdrop me a line%s.'), '<a href="http://dennishoppe.de/contribution-voucher-code" target="_blank">', '</a>'); ?> </small>) </p> </div> <ul> <li><?php echo $this->t('Make a gift of the Amazon Wish List'); ?> : <ul> <li>» <a href="http://amzn.com/w/1A45MS7KY75CY" title="<?php echo $this->t('Amazon USA'); ?> " target="_blank"><?php echo $this->t('Amazon USA'); ?> </a></li> <li>» <a href="http://www.amazon.de/wishlist/2AG0R8BHEOJOL" title="<?php echo $this->t('Amazon Germany'); ?> " target="_blank"><?php echo $this->t('Amazon Germany'); ?> </a></li> </ul> </li> <li class="hide_if_js"><?php echo $this->t('Make a contribution via PayPal'); ?> : <ul> <li>» <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=1220480" target="_blank">United States dollar ($)</a></li> <li>» <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=U49F54BMWKNHU" target="_blank">Pound sterling (£)</a></li> <li>» <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HECSPGLPTQL24" target="_blank">Euro (€)</a></li> </ul> </li> <li class="show_if_js" style="display:none"><?php echo $this->t('Make a contribution via PayPal'); ?> : <ul> <li>» <a href="#" title="<?php echo $this->t('Make a contribution in US Dollars'); ?> " class="dennis_hoppe_contribution_show_ui">United States Dollar ($)</a> <div class="dennis_hoppe_contribution_ui"> <?php echo $this->t('Amount'); ?> : <input type="hidden" class="dennis_hoppe_contribution_currency" value="USD" /> <select class="dennis_hoppe_contribution_amount"> <option value="" disabled="disabled" selected="selected"><?php echo $this->t('Amount in USD'); ?> </option> <?php for ($amount = 6.95; $amount < 100; $amount *= 1.3) { ?> <option value="<?php echo Number_Format($amount, 2, '.', ''); ?> ">US$<?php echo Number_Format($amount, 2); ?> </option> <?php } ?> </select> <input type="button" class="dennis_hoppe_contribution_button button-primary" value="<?php echo $this->t('Proceed to PayPal'); ?> →" title="<?php echo $this->t('Proceed to PayPal'); ?> " disabled="disabled" /> </div> </li> <li>» <a href="#" title="<?php echo $this->t('Make a contribution in Pound sterling'); ?> " class="dennis_hoppe_contribution_show_ui">Pound Sterling (£)</a> <div class="dennis_hoppe_contribution_ui hide_if_js"> <?php echo $this->t('Amount'); ?> : <input type="hidden" class="dennis_hoppe_contribution_currency" value="GBP" /> <select class="dennis_hoppe_contribution_amount"> <option value="" disabled="disabled" selected="selected"><?php echo $this->t('Amount in GBP'); ?> </option> <?php for ($amount = 5.95; $amount < 100; $amount *= 1.3) { ?> <option value="<?php echo Number_Format($amount, 2, '.', ''); ?> ">£<?php echo Number_Format($amount, 2); ?> </option> <?php } ?> </select> <input type="button" class="dennis_hoppe_contribution_button button-primary" value="<?php echo $this->t('Proceed to PayPal'); ?> →" title="<?php echo $this->t('Proceed to PayPal'); ?> " disabled="disabled" /> </div> </li> <li>» <a href="#" title="<?php echo $this->t('Make a contribution in Euro'); ?> " class="dennis_hoppe_contribution_show_ui">Euro (€)</a> <div class="dennis_hoppe_contribution_ui hide_if_js"> <?php echo $this->t('Amount'); ?> : <input type="hidden" class="dennis_hoppe_contribution_currency" value="EUR" /> <select class="dennis_hoppe_contribution_amount"> <option value="" disabled="disabled" selected="selected"><?php echo $this->t('Amount in EUR'); ?> </option> <?php for ($amount = 5.95; $amount < 100; $amount *= 1.3) { ?> <option value="<?php echo Number_Format($amount, 2, '.', ''); ?> "><?php echo Number_Format($amount, 2, ',', ''); ?> €</option> <?php } ?> </select> <input type="button" class="dennis_hoppe_contribution_button button-primary" value="<?php echo $this->t('Proceed to PayPal'); ?> →" title="<?php echo $this->t('Proceed to PayPal'); ?> " disabled="disabled" /> </div> </li> <li>» <a href="#" title="<?php echo $this->t('Make a contribution in another currency'); ?> " class="dennis_hoppe_contribution_show_ui"><?php echo $this->t('Other currency'); ?> </a> <div class="dennis_hoppe_contribution_ui hide_if_js"> <input type="hidden" class="dennis_hoppe_contribution_amount" value="" /> <select class="dennis_hoppe_contribution_currency"> <option value="" disabled="disabled" selected="selected"><?php echo $this->t('International currency'); ?> </option> <option value="CAD">Dollar canadien (C$)</option> <option value="JPY">Yen (¥)</option> <option value="AUD">Australian dollar (A$)</option> <option value="CHF">Franken (SFr)</option> <option value="NOK">Norsk krone (kr)</option> <option value="SEK">Svensk krona (kr)</option> <option value="DKK">Dansk krone (kr)</option> <option value="PLN">Polski zloty</option> <option value="HUF">Magyar forint (Ft)</option> <option value="CZK">koruna česká (Kč)</option> <option value="SGD">Ringgit Singapura (S$)</option> <option value="HKD">Hong Kong dollar (HK$)</option> <option value="ILS">שקל חדש (₪)</option> <option value="MXN">Peso mexicano (Mex$)</option> <option value="NZD">Tāra o Aotearoa (NZ$)</option> <option value="PHP">Piso ng Pilipinas (piso)</option> <option value="TWD">New Taiwan dollar (NT$)</option> </select> <input type="button" class="dennis_hoppe_contribution_button button-primary" value="<?php echo $this->t('Proceed to PayPal'); ?> →" title="<?php echo $this->t('Proceed to PayPal'); ?> " disabled="disabled" /> </div> </li> </ul> </li> </ul> <?php if ($this->is_dashboard && current_user_can('activate_plugins')) { ?> <div class="remove-notification" style="text-align:right"> <form action="<?php echo Admin_Url('plugins.php'); ?> " method="post"> <input type="hidden" name="action" value="deactivate-selected"> <?php WP_Nonce_Field('bulk-plugins'); ?> <?php foreach ($this->Get_Extension_Files() as $plugin_file) { ?> <input type="hidden" name="checked[]" value="<?php echo $plugin_file; ?> "> <?php } ?> <p> <input type="submit" value="<?php echo $this->t('No thanks. Remove this box now!'); ?> " class="button"> </p> </form> </div> <?php } ?> <div class="clear"></div><?php }
<?php /* Plugin Name: Glossary Description: glossary Version: 1 Text Domain: glossary Domain Path: /languages/ */ include DirName(__FILE__) . '/classes/class.core.php'; include DirName(__FILE__) . '/classes/class.glossary-type.php'; include DirName(__FILE__) . '/classes/class.i18n.php'; include DirName(__FILE__) . '/classes/class.options.php'; include DirName(__FILE__) . '/classes/class.permalinks.php'; include DirName(__FILE__) . '/classes/class.post-type.php'; include DirName(__FILE__) . '/classes/class.prefix-filter.php'; include DirName(__FILE__) . '/classes/class.shortcodes.php'; include DirName(__FILE__) . '/classes/class.template.php'; include DirName(__FILE__) . '/classes/class.wp-query-extensions.php'; include DirName(__FILE__) . '/classes/class.wpml.php'; WordPress\Plugin\Glossary\Core::Init(__FILE__);
public function Get_Default_Feed_Template() { return DirName(__FILE__) . '/templates/default/default.php'; }
function IO_Write($Path, $Data, $IsRewrite = FALSE, $Wait = 3) { /******************************************************************************/ $__args_types = array('string', 'string', 'boolean', 'integer'); #------------------------------------------------------------------------------- $__args__ = Func_Get_Args(); eval(FUNCTION_INIT); /******************************************************************************/ Debug(SPrintF('[IO_Write]: запись в файл (%s)', $Path)); #------------------------------------------------------------------------------- if (File_Exists($Path)) { #------------------------------------------------------------------------------- $Start = Time() + $Wait; #------------------------------------------------------------------------------- do { } while (!Is_Writable($Path) && Time() < $Start); #------------------------------------------------------------------------------- } else { #------------------------------------------------------------------------------- $Folder = DirName($Path); #------------------------------------------------------------------------------- if (!File_Exists($Folder)) { #------------------------------------------------------------------------------- Debug(SPrintF('[IO_Write]: создание директории (%s)', $Folder)); #------------------------------------------------------------------------------- if (!@MkDir($Folder, 0777, TRUE)) { return ERROR | @Trigger_Error(SPrintF('[IO_Write]: не возможно создать директорию (%s)', $Folder)); } #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- $File = @Fopen($Path, $IsRewrite ? 'w' : 'a'); if (!$File) { return ERROR | @Trigger_Error('[IO_Write]: ошибка открытия файла'); } #------------------------------------------------------------------------------- if (!@Fwrite($File, $Data)) { return ERROR | @Trigger_Error('[IO_Write]: ошибка записи в файл'); } #------------------------------------------------------------------------------- if (!@Fclose($File)) { return ERROR | @Trigger_Error('[IO_Write]: ошибка закрытия файла'); } #------------------------------------------------------------------------------- # почему закомменчено - не знаю. так было. #if(Preg_Match('/\/tmp\//',$Path)) # if(!@ChMod($Path,0666)) # @Trigger_Error('[IO_Write]: ошибка установки прав на файл'); #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return TRUE; #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- }
public function Load_TextDomain() { $locale = Apply_Filters('plugin_locale', Get_Locale(), __CLASS__); Load_TextDomain(__CLASS__, DirName(__FILE__) . '/language/' . $locale . '.mo'); }
} } if (isset($MySQLbin)) { $TestMySQL = array('Name' => 'Клиент MySQL', 'Status' => $MySQLbin, 'IsOk' => TRUE); } Set_Error_Handler('__Error_Handler__'); Define('PHP_INI_PATH', 'php.ini'); $HostID = StrToLower(@$_SERVER['HTTP_HOST']); if (Preg_Match('/^www\\.(.+)$/', $HostID, $Mathces)) { $HostID = Next($Mathces); } if (Preg_Match('/^(.+)\\:[0-9]+$/', $HostID, $Mathces)) { $HostID = Next($Mathces); } Define('HOST_ID', $HostID); Define('SYSTEM_PATH', DirName(DirName(__FILE__))); Define('SETTINGS_FILE', SPrintF('%s/install.settings', SYSTEM_PATH)); Define('MY_CNF', SPrintF('%s/install.my.cnf', SYSTEM_PATH)); $__SETTINGS = array('db-server' => 'localhost', 'db-port' => '3306', 'db-type' => 'exists', 'db-root' => '', 'db-user' => 'jbs', 'db-password' => 'password', 'db-name' => 'jbs'); if (!isset($_GET['flush']) && File_Exists(SETTINGS_FILE)) { $__SETTINGS = @File_Get_Contents(SETTINGS_FILE); if (!$__SETTINGS) { Error(SPrintF('Не удалось прочитать файл конфигурации (%s)', SETTINGS_FILE)); } $__SETTINGS = JSON_Decode($__SETTINGS, TRUE); } $__STEP_ID = isset($_POST['step-id']) ? Max(0, $_POST['step-id']) : 0; echo <<<EOD <HTML> <HEAD> <TITLE>Установка биллинговой системы</TITLE>
function Get_Default_Feed_Template() { return DirName(__FILE__) . '/templates/thumbnails-only/thumbnails-only.php.php'; }
function Print_Import_Images_Form($message = '') { Media_Upload_Header(); include DirName(__FILE__) . '/meta-boxes/import-images-form.php'; }
<?php /* Plugin Name: Fancy Gallery Lite Plugin URI: http://dennishoppe.de/en/wordpress-plugins/fancy-gallery Description: Fancy Gallery enables you to create and manage galleries and converts your galleries in post and pages to valid HTML5 blocks and associates linked images with a nice and responsive lightbox. Version: 1.5.37 Author: Dennis Hoppe Author URI: http://DennisHoppe.de */ $plugin_folder = DirName(__FILE__); # Load core classes include $plugin_folder . '/classes/class.core.php'; include $plugin_folder . '/classes/class.gallery-post-type.php'; include $plugin_folder . '/classes/class.lightbox.php'; include $plugin_folder . '/classes/class.i18n.php'; include $plugin_folder . '/classes/class.mocking-bird.php'; include $plugin_folder . '/classes/class.options.php'; include $plugin_folder . '/classes/class.wpml.php'; # Load widgets include $plugin_folder . '/widgets/widget.random-images.php'; include $plugin_folder . '/widgets/widget.taxonomies.php'; include $plugin_folder . '/widgets/widget.taxonomy-cloud.php'; # Inititalize Plugin: Will cause a synthax error in PHP < 5.3 new WordPress\Plugin\Fancy_Gallery\Core(__FILE__);
#------------------------------------------------------------------------------- echo SPrintF("Удаление файла (%s)\n", $Deleted); #------------------------------------------------------------------------------- $File = SPrintF('%s/%s', SYSTEM_PATH, $Deleted); #------------------------------------------------------------------------------- if (!Is_Writable($File)) { return SPrintF("ERROR: недостаточно прав на удаление файла (%s)\n", $File); } #------------------------------------------------------------------------------- if ($Commit) { if (!@UnLink($File)) { return SPrintF("ERROR: не возможно удалить файл (%s)\n", $File); } } #------------------------------------------------------------------------------- $Dir = DirName($File); #------------------------------------------------------------------------------- $Files = IO_Scan($Dir); if (Is_Error($Files)) { return SPrintF("---\n%s\n---\n", Implode("\n", Array_Slice($__SYSLOG, Count($__SYSLOG) - 20))); } #------------------------------------------------------------------------------- if (!Count($Files)) { #------------------------------------------------------------------------------- echo SPrintF("Удаление директории (%s)\n", $Dir); #------------------------------------------------------------------------------- if (!@RmDir($Dir)) { return SPrintF("ERROR: не возможно удалить директорию (%s)\n", $Dir); } #------------------------------------------------------------------------------- }
function prepare_cache_file() { // Prepare Cache file if (!Is_Dir($this->cache_dir_path) && !Is_File($this->cache_dir_path) && Is_Writable(DirName($this->cache_dir_path))) { MkDir($this->cache_dir_path); ChMod($this->cache_dir_path, 0755); } if (Is_Dir($this->cache_dir_path) && Is_Writable($this->cache_dir_path)) { Touch($this->cache_file_path); } }