PageRenderTime 1679ms queryTime 49ms sortTime 0ms getByIdsTime 405ms findMatchingLines 154ms

100+ results results for 'php is_readable repo:toske/Ad Preview' (1679 ms)

Not the results you expected?
ext_imagick.cpp https://github.com/tstarling/hiphop-php.git | C++ | 359 lines
                    
2   +----------------------------------------------------------------------+
                    
3   | HipHop for PHP                                                       |
                    
4   +----------------------------------------------------------------------+
                    
5   | Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com)     |
                    
6   | Copyright (c) 1997-2010 The PHP Group                                |
                    
7   +----------------------------------------------------------------------+
                    
7   +----------------------------------------------------------------------+
                    
8   | This source file is subject to version 3.01 of the PHP license,      |
                    
9   | that is bundled with this package in the file LICENSE, and is        |
                    
10   | available through the world-wide-web at the following url:           |
                    
11   | http://www.php.net/license/3_01.txt                                  |
                    
12   | If you did not receive a copy of the PHP license and are unable to   |
                    
13   | obtain it through the world-wide-web, please send a note to          |
                    
14   | license@php.net so we can mail you a copy immediately.               |
                    
15   +----------------------------------------------------------------------+
                    
                
upgradelib.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 623 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
30global $CFG;
                    
31require_once($CFG->dirroot . '/question/engine/bank.php');
                    
32require_once($CFG->dirroot . '/question/engine/upgrade/logger.php');
                    
32require_once($CFG->dirroot . '/question/engine/upgrade/logger.php');
                    
33require_once($CFG->dirroot . '/question/engine/upgrade/behaviourconverters.php');
                    
34
                    
66
                    
67        gc_collect_cycles(); // This was really helpful in PHP 5.2. Perhaps remove.
                    
68        $a = new stdClass();
                    
91        $partialupgradefile = $CFG->dirroot . '/' . $CFG->admin .
                    
92                '/tool/qeupgradehelper/partialupgrade.php';
                    
93        $partialupgradefunction = 'tool_qeupgradehelper_get_quizzes_to_upgrade';
                    
93        $partialupgradefunction = 'tool_qeupgradehelper_get_quizzes_to_upgrade';
                    
94        if (is_readable($partialupgradefile)) {
                    
95            include_once($partialupgradefile);
                    
                
locallib.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 673 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
36    $dbman = $DB->get_manager();
                    
37    return is_readable($CFG->dirroot . '/question/engine/upgrade/upgradelib.php') &&
                    
38            $dbman->table_exists('question_usages');
                    
62 * Get the URL of a script within this plugin.
                    
63 * @param string $script the script name, without .php. E.g. 'index'.
                    
64 * @param array $params URL parameters (optional).
                    
66function tool_qeupgradehelper_url($script, $params = array()) {
                    
67    return new moodle_url('/admin/tool/qeupgradehelper/' . $script . '.php', $params);
                    
68}
                    
152
                    
153            WHERE quiza.preview = 0
                    
154                ' . $this->extra_where_clause() . '
                    
177            $quizinfo->id,
                    
178            html_writer::link(new moodle_url('/course/view.php',
                    
179                    array('id' => $quizinfo->courseid)), format_string($quizinfo->shortname)),
                    
                
upgrade.php https://bitbucket.org/ngmares/moodle.git | PHP | 332 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
99        // duplicate entries {quizid}-{userid}-{attempt}. We do two things to
                    
100        // prevent these problems. First, here, we delete all preview attempts.
                    
101
                    
113        // Get a list of response variables that have files.
                    
114        require_once($CFG->dirroot . '/question/type/questiontypebase.php');
                    
115        $variables = array();
                    
116        foreach (get_plugin_list('qtype') as $qtypename => $path) {
                    
117            $file = $path . '/questiontype.php';
                    
118            if (!is_readable($file)) {
                    
140
                    
141        // Get all the contexts where there are previews.
                    
142        $contextids = $DB->get_records_sql_menu("
                    
145                  JOIN {quiz_attempts} quiza ON quiza.uniqueid = qu.id
                    
146                 WHERE quiza.preview = 1");
                    
147
                    
                
fpw-category-thumbnails-class.php https://gitlab.com/Gashler/sg | PHP | 797 lines
                    
1<?php
                    
2//	prevent direct accesss
                    
61		add_action( 'save_post', array( &$this, 'addThumbnailToPost' ), 10, 2 );
                    
62		add_action( 'after_plugin_row_fpw-category-thumbnails/fpw-category-thumbnails.php', array( &$this, 'afterPluginMeta' ), 10, 2 );
                    
63		add_action( 'admin_bar_menu', array( &$this, 'pluginToAdminBar' ), 1010 );
                    
65        
                    
66		register_activation_hook( $this->fctPath . '/fpw-category-thumbnails.php', array( &$this, 'uninstallMaintenance' ) );
                    
67		
                    
75
                    
76		add_filter( 'plugin_action_links_fpw-category-thumbnails/fpw-category-thumbnails.php', array( &$this, 'pluginLinks' ), 10, 2);
                    
77		add_filter( 'plugin_row_meta', array( &$this, 'pluginMetaLinks'), 10, 2 );
                    
100    	    	$value = $map[ $id ];
                    
101				$preview_size = 'thumbnail';
                    
102				if ( 'ngg-' == substr( $value, 0, 4 ) ) {
                    
120						if ( wp_attachment_is_image( $value ) ) {
                    
121							return wp_get_attachment_image( $value, $preview_size );
                    
122						} else {
                    
                
composer-setup.php https://gitlab.com/vasilyb/cornerstone | PHP | 1511 lines
                    
40    $quiet      = in_array('--quiet', $argv);
                    
41    $channel    = in_array('--snapshot', $argv) ? 'snapshot' : (in_array('--preview', $argv) ? 'preview' : 'stable');
                    
42    $disableTls = in_array('--disable-tls', $argv);
                    
90--install-dir="..."  accepts a target installation directory
                    
91--preview            install the latest version from the preview (alpha/beta/rc) channel instead of stable
                    
92--snapshot           install the latest version from the snapshot (dev builds) channel instead of stable
                    
231    if ($iniPath = php_ini_loaded_file()) {
                    
232        $iniMessage = PHP_EOL.'The php.ini used by your command-line PHP is: ' . $iniPath;
                    
233    } else {
                    
315        $errors['php'] = array(
                    
316            'Your PHP ('.PHP_VERSION.') is too old, you must upgrade to PHP 5.3.2 or higher.'
                    
317        );
                    
321        $warnings['php'] = array(
                    
322            'Your PHP ('.PHP_VERSION.') is quite old, upgrading to PHP 5.3.4 or higher is recommended.',
                    
323            'Composer works with 5.3.2+ for most people, but there might be edge case issues.'
                    
                
ml-slider.php https://gitlab.com/thisishayat/itv-2016 | PHP | 1318 lines
                    
89            'metaflexslider'         => METASLIDER_PATH . 'inc/slider/metaslider.flex.class.php',
                    
90            'metanivoslider'         => METASLIDER_PATH . 'inc/slider/metaslider.nivo.class.php',
                    
91            'metaresponsiveslider'   => METASLIDER_PATH . 'inc/slider/metaslider.responsive.class.php',
                    
111
                    
112            // >= PHP 5.2 - Use auto loading
                    
113            if ( function_exists( "__autoload" ) ) {
                    
120
                    
121            // < PHP5.2 - Require all classes
                    
122            foreach ( $this->plugin_classes() as $id => $path ) {
                    
171
                    
172        add_action( 'admin_post_metaslider_preview', array( $this, 'do_preview' ) );
                    
173        add_action( 'admin_post_metaslider_hide_go_pro_page', array( $this, 'hide_go_pro_page' ) );
                    
333            <p><?php echo $gopro_link; ?></p>
                    
334            <p><?php echo $support_link; ?> <?php echo $documentation_link; ?></p>
                    
335            <p><em>Don't want to see this? <?php echo $hide_link; ?></em></p>
                    
                
upgradelib.php https://github.com/kpike/moodle.git | PHP | 607 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
30global $CFG;
                    
31require_once($CFG->dirroot . '/question/engine/bank.php');
                    
32require_once($CFG->dirroot . '/question/engine/upgrade/logger.php');
                    
32require_once($CFG->dirroot . '/question/engine/upgrade/logger.php');
                    
33require_once($CFG->dirroot . '/question/engine/upgrade/behaviourconverters.php');
                    
34
                    
66
                    
67        gc_collect_cycles(); // This was really helpful in PHP 5.2. Perhaps remove.
                    
68        $a = new stdClass();
                    
90        // Look to see if the admin has set things up to only upgrade certain attempts.
                    
91        $partialupgradefile = $CFG->dirroot . '/local/qeupgradehelper/partialupgrade.php';
                    
92        $partialupgradefunction = 'local_qeupgradehelper_get_quizzes_to_upgrade';
                    
92        $partialupgradefunction = 'local_qeupgradehelper_get_quizzes_to_upgrade';
                    
93        if (is_readable($partialupgradefile)) {
                    
94            include_once($partialupgradefile);
                    
                
locallib.php https://github.com/kpike/moodle.git | PHP | 661 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
36    $dbman = $DB->get_manager();
                    
37    return is_readable($CFG->dirroot . '/question/engine/upgrade/upgradelib.php') &&
                    
38            $dbman->table_exists('question_usages');
                    
62 * Get the URL of a script within this plugin.
                    
63 * @param string $script the script name, without .php. E.g. 'index'.
                    
64 * @param array $params URL parameters (optional).
                    
66function local_qeupgradehelper_url($script, $params = array()) {
                    
67    return new moodle_url('/local/qeupgradehelper/' . $script . '.php', $params);
                    
68}
                    
152
                    
153            WHERE quiza.preview = 0
                    
154                ' . $this->extra_where_clause() . '
                    
177            $quizinfo->id,
                    
178            html_writer::link(new moodle_url('/course/view.php',
                    
179                    array('id' => $quizinfo->courseid)), format_string($quizinfo->shortname)),
                    
                
functions.php https://bitbucket.org/cevenson/photosites-themes.git | PHP | 682 lines
                    
14 * (those wrapped in a function_exists() call) by defining them first in your child theme's
                    
15 * functions.php file. The child theme's functions.php file is included before the parent
                    
16 * theme's file, so the child theme functions would be used.
                    
125		'wp-head-callback' => 'twentyeleven_header_style',
                    
126		// Callback for styling the header preview in the admin.
                    
127		'admin-head-callback' => 'twentyeleven_admin_header_style',
                    
191		#site-description {
                    
192			color: #<?php echo $text_color; ?> !important;
                    
193		}
                    
195	</style>
                    
196	<?php
                    
197}
                    
269		?>
                    
270		<h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
                    
271		<div id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
                    
                
Theme.class.php https://github.com/drbowen/openemr.git | PHP | 601 lines
                    
1<?php
                    
2/* vim: set expandtab sw=4 ts=4 sts=4: */
                    
5 *
                    
6 * @package PhpMyAdmin
                    
7 */
                    
7 */
                    
8if (! defined('PHPMYADMIN')) {
                    
9    exit;
                    
18 *
                    
19 * @package PhpMyAdmin
                    
20 */
                    
90    {
                    
91        if (! file_exists($this->getPath() . '/info.inc.php')) {
                    
92            return false;
                    
94
                    
95        if ($this->mtime_info === filemtime($this->getPath() . '/info.inc.php')) {
                    
96            return true;
                    
                
class.plx.motor.php https://github.com/flagos/Personal-page.git | PHP | 951 lines
                    
51		# Version de PluXml
                    
52		if(!is_readable(PLX_ROOT.'version')) {
                    
53			header('Content-Type: text/plain charset=UTF-8');
                    
114			$this->bypage = $bypage; # Nombre d'article par page
                    
115			$this->template = $mode.'.php';
                    
116		}
                    
116		}
                    
117		elseif($this->get AND preg_match('/^preview\/?/',$this->get) AND isset($_SESSION['preview'])) {
                    
118			$this->mode = 'preview';
                    
153			$this->bypage = NULL; # Pas de pagination pour ce mode bien sur ;)
                    
154			$this->template = isset($this->aStats[ $this->cible ]) ? $this->aStats[ $this->cible ]['template'] : 'erreur.php';
                    
155		}
                    
251				$this->mode = 'erreur';
                    
252				$this->template = 'erreur.php';
                    
253				return;
                    
                
kc-settings.php https://bitbucket.org/akeda/bmw-id-hris.git | PHP | 869 lines
                    
1<?php
                    
2
                    
60
                    
61		require_once "{$paths['inc']}/form.php";
                    
62		require_once "{$paths['inc']}/helper.php";
                    
65		$mo_file = $paths['inc'].'/languages/kc-settings-'.get_locale().'.mo';
                    
66		if ( is_readable($mo_file) )
                    
67			load_textdomain( 'kc-settings', $mo_file );
                    
74		# Debug bar extension
                    
75		require_once "{$paths['inc']}/debug-bar-ext.php";
                    
76		add_filter( 'debug_bar_panels', array(__CLASS__, 'debug_bar_ext') );
                    
87				'insert_button' => __( 'Select', 'kc-settings' ), // Button text
                    
88				'preview_size'  => 'thumbnail',
                    
89				'animate'       => 500,
                    
105		# Options helpers
                    
106		require_once self::$data['paths']['inc'] . '/options.php';
                    
107		kcSettings_options::init();
                    
                
template.php https://gitlab.com/michield/dokuwiki | PHP | 1694 lines
                    
1<?php
                    
2/**
                    
23
                    
24    if(@is_readable(DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$file))
                    
25        return DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$file;
                    
60 * (defined by the global $ACT var) by calling the appropriate
                    
61 * outputfunction(s) from html.php
                    
62 *
                    
102            break;
                    
103        /** @noinspection PhpMissingBreakStatementInspection */
                    
104        case 'locked':
                    
109            break;
                    
110        case 'preview':
                    
111            html_edit();
                    
304        'rel' => 'search', 'type'=> 'application/opensearchdescription+xml',
                    
305        'href'=> DOKU_BASE.'lib/exe/opensearch.php', 'title'=> $conf['title']
                    
306    );
                    
                
template.php https://github.com/godber/PHXdata-Website.git | PHP | 1363 lines
                    
1<?php
                    
2/**
                    
19
                    
20    if(@is_readable(DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$tpl))
                    
21        return DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$tpl;
                    
30 * (defined by the global $ACT var) by calling the appropriate
                    
31 * outputfunction(s) from html.php
                    
32 *
                    
68            break;
                    
69        case 'preview':
                    
70            html_edit();
                    
259    $head['link'][] = array( 'rel'=>'search', 'type'=>'application/opensearchdescription+xml',
                    
260            'href'=>DOKU_BASE.'lib/exe/opensearch.php', 'title'=>$conf['title'] );
                    
261    $head['link'][] = array( 'rel'=>'start', 'href'=>DOKU_BASE );
                    
268        $head['link'][] = array( 'rel'=>'alternate', 'type'=>'application/rss+xml',
                    
269                'title'=>'Recent Changes', 'href'=>DOKU_BASE.'feed.php');
                    
270        $head['link'][] = array( 'rel'=>'alternate', 'type'=>'application/rss+xml',
                    
                
ml-slider.php https://gitlab.com/haque.mdmanzurul/barongbarong | PHP | 1251 lines
                    
89            'metaflexslider'        => METASLIDER_PATH . 'inc/slider/metaslider.flex.class.php',
                    
90            'metanivoslider'        => METASLIDER_PATH . 'inc/slider/metaslider.nivo.class.php',
                    
91            'metaresponsiveslider'  => METASLIDER_PATH . 'inc/slider/metaslider.responsive.class.php',
                    
111
                    
112            // >= PHP 5.2 - Use auto loading
                    
113            if ( function_exists( "__autoload" ) ) {
                    
120
                    
121            // < PHP5.2 - Require all classes
                    
122            foreach ( $this->plugin_classes() as $id => $path ) {
                    
171
                    
172        add_action( 'admin_post_metaslider_preview', array( $this, 'do_preview' ) );
                    
173        add_action( 'admin_post_metaslider_hide_go_pro_page', array( $this, 'hide_go_pro_page' ) );
                    
327            <p><?php echo $gopro_link; ?></p>
                    
328            <p><?php echo $support_link; ?> <?php echo $documentation_link; ?></p>
                    
329            <p><em>Don't want to see this? <?php echo $hide_link; ?></em></p>
                    
                
composer-setup.php https://gitlab.com/luchoman08/personal_collection_mv | PHP | 1206 lines
                    
179    if ($iniPath) {
                    
180        $iniMessage = PHP_EOL.PHP_EOL.'The php.ini used by your command-line PHP is: ' . $iniPath;
                    
181    } else {
                    
302                    $text = PHP_EOL."The suhosin.executor.include.whitelist setting is incorrect.".PHP_EOL;
                    
303                    $text .= "Add the following to the end of your `php.ini` or suhosin.ini (Example path [for Debian]: /etc/php5/cli/conf.d/suhosin.ini):".PHP_EOL;
                    
304                    $text .= "    suhosin.executor.include.whitelist = phar ".$current;
                    
308                case 'php':
                    
309                    $text = PHP_EOL."Your PHP ({$current}) is too old, you must upgrade to PHP 5.3.2 or higher.";
                    
310                    break;
                    
360                case 'curlwrappers':
                    
361                    $text = PHP_EOL."PHP was compiled with --with-curlwrappers which will cause issues with HTTP authentication and GitHub.".PHP_EOL;
                    
362                    $text .= "Recompile it without this flag if possible";
                    
380                case 'php':
                    
381                    $text = PHP_EOL."Your PHP ({$current}) is quite old, upgrading to PHP 5.3.4 or higher is recommended.".PHP_EOL;
                    
382                    $text .= "Composer works with 5.3.2+ for most people, but there might be edge case issues.";
                    
                
questionlib.php https://github.com/nadavkav/MoodleTAO.git | PHP | 1288 lines
                    
1<?php  // $Id$
                    
2/**
                    
7 * This script also loads the questiontype classes
                    
8 * Code for handling the editing of questions is in {@link question/editlib.php}
                    
9 *
                    
78/**
                    
79 * The options used when popping up a question preview window in Javascript.
                    
80 */
                    
80 */
                    
81define('QUESTION_PREVIEW_POPUP_OPTIONS', 'scrollbars=yes,resizable=yes,width=700,height=540');
                    
82
                    
148
                    
149require_once("$CFG->dirroot/question/type/questiontype.php");
                    
150
                    
150
                    
151// Load the questiontype.php file for each question type
                    
152// These files in turn call question_register_questiontype()
                    
                
init.php https://github.com/DX66/private_sales.git | PHP | 1301 lines
                    
78
                    
79if (version_compare(phpversion(), '5.0.0') >= 0) {
                    
80    define('X_PHP5x_COMPAT', true);
                    
95
                    
96if (!@is_readable($xcart_dir . '/config.php')) {
                    
97
                    
105    file_exists($xcart_dir . '/config.local.php')
                    
106    && is_readable($xcart_dir . '/config.local.php')
                    
107) {
                    
158
                    
159    $extra_info .= "<p>If the installation process has been completed, but you are getting this message, the problem is likely caused by incorrect information in your config.php file. Check the file config.php and make sure the SQL database details settings in it are correct.</p>";
                    
160
                    
323
                    
324    $_SERVER['PHP_SELF'] = $PHP_SELF;
                    
325
                    
                
template.php https://github.com/micz/elencode.git | PHP | 1336 lines
                    
1<?php
                    
2/**
                    
19
                    
20  if(@is_readable(DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$tpl))
                    
21    return DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$tpl;
                    
30 * (defined by the global $ACT var) by calling the appropriate
                    
31 * outputfunction(s) from html.php
                    
32 *
                    
62      break;
                    
63    case 'preview':
                    
64      html_edit($TEXT);
                    
255  $head['link'][] = array( 'rel'=>'search', 'type'=>'application/opensearchdescription+xml',
                    
256                           'href'=>DOKU_BASE.'lib/exe/opensearch.php', 'title'=>$conf['title'] );
                    
257  $head['link'][] = array( 'rel'=>'start', 'href'=>DOKU_BASE );
                    
264    $head['link'][] = array( 'rel'=>'alternate', 'type'=>'application/rss+xml',
                    
265                             'title'=>'Recent Changes', 'href'=>DOKU_BASE.'feed.php');
                    
266    $head['link'][] = array( 'rel'=>'alternate', 'type'=>'application/rss+xml',
                    
                
image.php https://github.com/oicericbarbosajr/exponent-cms.git | PHP | 504 lines
                    
1<?php
                    
2
                    
19
                    
20include_once(realpath(dirname(__FILE__).'/../compat/gd_info.php'));
                    
21
                    
34/* exdoc
                    
35 * Output the contents of the fallback preview image.
                    
36 *
                    
36 *
                    
37 * This is used by the dynamic thumbnail script (/thumb.php)
                    
38 * if it finds that the server does not have to appropriate GD
                    
38 * if it finds that the server does not have to appropriate GD
                    
39 * support to generate a specific type of preview (i.e. no GIF support)
                    
40 * or if GD isn't enabled at all.
                    
44 */
                    
45function exponent_image_showFallbackPreviewImage($base,$error = IMAGE_ERR_NOGD) {
                    
46	$fh = fopen($base.'subsystems/image/default_preview'.$error.'.gif','rb');
                    
                
submit.php https://github.com/severnaya99/Sg-2010.git | PHP | 473 lines
                    
47// POST variables
                    
48$preview_name = empty( $_POST['preview_name'] ) ? '' : $_POST['preview_name'] ;
                    
49
                    
156
                    
157		if( $preview_name != '' && is_readable( "$photos_dir/$preview_name" ) ) {
                    
158			$tmp_name = $preview_name ;
                    
324			myalbum_modify_photo( "$photos_dir/$tmp_name" , "$photos_dir/$preview_name" ) ;
                    
325			list( $imgsrc , $width_spec , $ahref ) = myalbum_get_img_attribs_for_preview( $preview_name ) ;
                    
326		} else {
                    
331		}
                    
332	} else if( $preview_name != '' && is_readable( "$photos_dir/$preview_name" ) ) {
                    
333		// old preview
                    
333		// old preview
                    
334		list( $imgsrc , $width_spec , $ahref ) = myalbum_get_img_attribs_for_preview( $preview_name ) ;
                    
335	} else {
                    
                
functions.php https://bitbucket.org/mshmsh5000/wp-demo.git | PHP | 1301 lines
                    
5 */
                    
6if ( is_admin() && is_readable( get_template_directory() . '/includes/theme-options.php' ) )
                    
7	require_once( get_template_directory() . '/includes/theme-options.php' );
                    
223	}
                    
224<?php else : ?>
                    
225	#site-title a,
                    
301			<a id="name" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>">
                    
302				<img src="<?php header_image(); ?>" alt="<?php bloginfo( 'name' ); ?>" width="<?php echo ( pinboard_get_option( 'retina_header' ) ? absint( get_custom_header()->width / 2 ) : get_custom_header()->width ); ?>" height="<?php echo ( pinboard_get_option( 'retina_header' ) ? absint( get_custom_header()->height / 2 ) : get_custom_header()->height ); ?>" />
                    
303			</a>
                    
304		<?php endif; ?>
                    
305		<a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
                    
306	</h1>
                    
306	</h1>
                    
307	<div id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
                    
308	<div class="clear"></div>
                    
                
submit.php https://github.com/severnaya99/Sg-2010.git | PHP | 371 lines
                    
18// POST variables
                    
19$preview_name = empty( $_POST['preview_name'] ) ? '' : $_POST['preview_name'] ;
                    
20
                    
119
                    
120		if( $preview_name != '' && is_readable( "$photos_dir/$preview_name" ) ) {
                    
121			$tmp_name = $preview_name ;
                    
261		}
                    
262	} else if( $preview_name != '' && is_readable( "$photos_dir/$preview_name" ) ) {
                    
263		// old preview
                    
337$counter_hidden = new XoopsFormHidden( "fieldCounter" , 1 ) ;
                    
338$preview_hidden = new XoopsFormHidden( "preview_name" , htmlspecialchars( $preview_name ) , ENT_QUOTES ) ;
                    
339
                    
340$submit_button = new XoopsFormButton( "" , "submit" , _SUBMIT , "submit" ) ;
                    
341$preview_button = new XoopsFormButton( "" , "preview" , _PREVIEW , "submit" ) ;
                    
342$reset_button = new XoopsFormButton( "" , "reset" , _CANCEL , "reset" ) ;
                    
                
customize_style.php https://gitlab.com/meixnertobias/thaimaidaiproductionwp | PHP | 521 lines
                    
344									(
                    
345										jQuery('#customize-control-settings-<?php echo esc_attr($control['name']); ?>').find('.color-picker-hex.wp-color-picker').val()<?php if($check_to_lower){ ?>.toLowerCase() <?php } printf("%s",$comparse); ?> '<?php printf("%s",$value_logics_or_out_items); ?>'
                    
346									)
                    
352									(
                    
353										jQuery('#customize-control-settings-<?php echo esc_attr($control['name']); ?>').find('.color-picker-hex.wp-color-picker').val()<?php if($check_to_lower){ ?>.toLowerCase() <?php } printf("%s",$comparse); ?> '<?php printf("%s",$value_logics_and_out_items); ?>'
                    
354									)
                    
366									(
                    
367										jQuery('#customize-control-settings-<?php echo esc_attr($control['name']); ?>.customize-control-image').find('img').val()<?php if($check_to_lower){ ?>.toLowerCase() <?php } printf("%s",$comparse); ?> '<?php printf("%s",$value_logics_or_out_items); ?>'
                    
368									)
                    
374									(
                    
375										jQuery('#customize-control-settings-<?php echo esc_attr($control['name']); ?>.customize-control-image').find('img').val()<?php if($check_to_lower){ ?>.toLowerCase() <?php } printf("%s",$comparse); ?> '<?php printf("%s",$value_logics_and_out_items); ?>'
                    
376									)
                    
388									(
                    
389									jQuery('*[data-customize-setting-link="<?php echo esc_attr($key_logic); ?>"]:checked').val()<?php if($check_to_lower){ ?>.toLowerCase() <?php } printf("%s",$comparse); ?> '<?php printf("%s",$value_logics_or_out_items); ?>'
                    
390									)
                    
                
pnadmin.php https://gitlab.com/bulwye/reliquerunt | PHP | 219 lines
                    
1<?php
                    
2// $Id: pnadmin.php 83 2005-10-07 12:06:29Z landseer $
                    
8// Based on:
                    
9// PHP-NUKE Web Portal System - http://phpnuke.org/
                    
10// Thatware - http://thatware.org/
                    
75        $pnr->assign('syntaxhiliteoffchecked', $syntaxhiliteoffchecked);
                    
76        $pnr->assign('code_preview', nl2br(pnModAPIFunc('pn_bbcode', 'user', 'transform',
                    
77                                                        array('objectid' => 1,
                    
77                                                        array('objectid' => 1,
                    
78                                                              'extrainfo' => "[code]<?php\n\necho 'test';\n\n?>[/code]"))));
                    
79        return $pnr->fetch('pn_bbcode_admin_codeconfig.html');
                    
107            $values = array_flip($additional_header);
                    
108            if(!array_key_exists($stylesheetlink, $values) && file_exists($stylesheet) && is_readable($stylesheet)) {
                    
109                $additional_header[] = $stylesheetlink;
                    
111        } else {
                    
112            if(file_exists($stylesheet) && is_readable($stylesheet)) {
                    
113                $additional_header[] = $stylesheetlink;
                    
                
skeleditor.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 201 lines
                    
1<?php
                    
2if (!defined("_ECRIRE_INC_VERSION")) return;
                    
9  $img_extension = array("jpg","png","gif","ico","bmp");
                    
10  $listed_extension = array("htm","html","xml","svg","php","php3","php4","py","sh","sql","css","rdf","txt","nfo","log","js","as","csv");
                    
11
                    
26  	
                    
27	if (@is_readable(_DIR_SESSIONS."charger_plugins_fonctions.php")){  // utile ?
                    
28		// chargement optimise precompile
                    
28		// chargement optimise precompile
                    
29		include_once(_DIR_SESSIONS."charger_plugins_fonctions.php");     	
                    
30	}
                    
69					           $_GET['f'] = $target;					           
                    
70                     $_GET['operation'] = 'preview';
                    
71                     if (file_exists($target)) {
                    
                
Config.php https://bitbucket.org/millien/illien.ch-wordpress.git | PHP | 311 lines
                    
27    function __construct($master = false, $blog_id = null) {
                    
28        $preview = w3_is_preview_mode();
                    
29        if (defined('WP_ADMIN')) {
                    
30            $config_admin = w3_instance('W3_ConfigAdmin');
                    
31            $preview = $config_admin->get_boolean('previewmode.enabled');
                    
32        }
                    
38            $this->_blog_id = $blog_id;
                    
39        $this->_preview = $preview;
                    
40        $this->load();
                    
82     * @param integer $direction +1: preview->production
                    
83     *                           -1: production->preview
                    
84     * @param boolean $remove_source remove source file
                    
287    private function _get_config_filename($forced_preview = null) {
                    
288        $preview = (is_null($forced_preview) ? $this->_preview : $forced_preview);
                    
289        $postfix = ($preview ? '-preview' : '') . '.php';
                    
                
ext_imagick.cpp https://gitlab.com/iranjith4/hhvm | C++ | 358 lines
                    
2   +----------------------------------------------------------------------+
                    
3   | HipHop for PHP                                                       |
                    
4   +----------------------------------------------------------------------+
                    
5   | Copyright (c) 2010-2016 Facebook, Inc. (http://www.facebook.com)     |
                    
6   | Copyright (c) 1997-2010 The PHP Group                                |
                    
7   +----------------------------------------------------------------------+
                    
7   +----------------------------------------------------------------------+
                    
8   | This source file is subject to version 3.01 of the PHP license,      |
                    
9   | that is bundled with this package in the file LICENSE, and is        |
                    
10   | available through the world-wide-web at the following url:           |
                    
11   | http://www.php.net/license/3_01.txt                                  |
                    
12   | If you did not receive a copy of the PHP license and are unable to   |
                    
13   | obtain it through the world-wide-web, please send a note to          |
                    
14   | license@php.net so we can mail you a copy immediately.               |
                    
15   +----------------------------------------------------------------------+
                    
                
submit.php https://github.com/severnaya99/Sg-2010.git | PHP | 315 lines
                    
1<?php
                    
2
                    
3/**
                    
4* $Id: submit.php 331 2007-12-23 16:01:11Z malanciault $
                    
5* Module: SmartSection
                    
9
                    
10include_once("header.php");
                    
11
                    
17if (!$categoriesArray) {
                    
18	redirect_header("index.php", 1, _MD_SSECTION_NEED_CATEGORY_ITEM);
                    
19	exit();
                    
43		)	{
                    
44	redirect_header("index.php", 1, _NOPERM);
                    
45	exit();
                    
53		) {
                    
54		redirect_header("index.php", 1, _NOPERM);
                    
55		exit();
                    
                
ImageToolbox.php git://github.com/QuickAppsCMS/QuickApps-CMS.git | PHP | 272 lines
                    
30    /**
                    
31     * List of preview modes. More modes can be defined using "addPreview()" method.
                    
32     *
                    
104     * @param string $filePath Full path to original image file
                    
105     * @param string $previewSize A valid preview preset
                    
106     * @return false|string Full path to thumbnail file on success, false otherwise
                    
118        $dstPath = normalizePath("{$srcPath}/.tmb/");
                    
119        $previewInfo = static::getPreviews($previewSize);
                    
120        require_once Plugin::classPath('Field') . 'Lib/class.upload.php';
                    
123        if (empty($previewInfo)) {
                    
124            $previews = static::getPreviews();
                    
125            $previewInfo = reset($previews);
                    
168    /**
                    
169     * Gets all defined previews, or information for an specific preview.
                    
170     *
                    
                
opensurvey.lib.php https://github.com/Dolibarr/dolibarr.git | PHP | 278 lines
                    
1<?php
                    
2/* Copyright (C) 2013 Laurent Destailleur  <eldy@users.sourceforge.net>
                    
19/**
                    
20 *	\file       htdocs/opensurvey/fonctions.php
                    
21 *	\ingroup    opensurvey
                    
38
                    
39	$head[0][0] = 'card.php?id='.$object->id_sondage;
                    
40	$head[0][1] = $langs->trans("Survey");
                    
43
                    
44	$head[1][0] = 'results.php?id='.$object->id_sondage;
                    
45	$head[1][1] = $langs->trans("SurveyResults");
                    
49	}
                    
50	$head[1][2] = 'preview';
                    
51	$h++;
                    
54	// Entries must be declared in modules descriptor with line
                    
55	// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__');   to add new tab
                    
56	// $this->tabs = array('entity:-tabname);   												to remove a tab
                    
                
upgradelib.php https://github.com/rwijaya/moodle.git | PHP | 623 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
30global $CFG;
                    
31require_once($CFG->dirroot . '/question/engine/bank.php');
                    
32require_once($CFG->dirroot . '/question/engine/upgrade/logger.php');
                    
32require_once($CFG->dirroot . '/question/engine/upgrade/logger.php');
                    
33require_once($CFG->dirroot . '/question/engine/upgrade/behaviourconverters.php');
                    
34
                    
66
                    
67        gc_collect_cycles(); // This was really helpful in PHP 5.2. Perhaps remove.
                    
68        $a = new stdClass();
                    
75    protected function prevent_timeout() {
                    
76        core_php_time_limit::raise(300);
                    
77        if ($this->doingbackup) {
                    
91        $partialupgradefile = $CFG->dirroot . '/' . $CFG->admin .
                    
92                '/tool/qeupgradehelper/partialupgrade.php';
                    
93        $partialupgradefunction = 'tool_qeupgradehelper_get_quizzes_to_upgrade';
                    
                
ext_imagick.cpp https://gitlab.com/alvinahmadov2/hhvm | C++ | 358 lines
                    
2   +----------------------------------------------------------------------+
                    
3   | HipHop for PHP                                                       |
                    
4   +----------------------------------------------------------------------+
                    
5   | Copyright (c) 2010-2015 Facebook, Inc. (http://www.facebook.com)     |
                    
6   | Copyright (c) 1997-2010 The PHP Group                                |
                    
7   +----------------------------------------------------------------------+
                    
7   +----------------------------------------------------------------------+
                    
8   | This source file is subject to version 3.01 of the PHP license,      |
                    
9   | that is bundled with this package in the file LICENSE, and is        |
                    
10   | available through the world-wide-web at the following url:           |
                    
11   | http://www.php.net/license/3_01.txt                                  |
                    
12   | If you did not receive a copy of the PHP license and are unable to   |
                    
13   | obtain it through the world-wide-web, please send a note to          |
                    
14   | license@php.net so we can mail you a copy immediately.               |
                    
15   +----------------------------------------------------------------------+
                    
                
Theme.class.php https://bitbucket.org/pavolve/masterskayaludmila.git | PHP | 445 lines
                    
1<?php
                    
2/* vim: set expandtab sw=4 ts=4 sts=4: */
                    
5 *
                    
6 * @package PhpMyAdmin
                    
7 */
                    
16 *
                    
17 * @package PhpMyAdmin
                    
18 */
                    
76    {
                    
77        if (! file_exists($this->getPath() . '/info.inc.php')) {
                    
78            return false;
                    
80
                    
81        if ($this->mtime_info === filemtime($this->getPath() . '/info.inc.php')) {
                    
82            return true;
                    
84
                    
85        @include $this->getPath() . '/info.inc.php';
                    
86
                    
                
Library.php https://gitlab.com/campus-academy/krowkaramel | PHP | 367 lines
                    
1<?php
                    
2
                    
105
                    
106            if (!is_readable($this->safe_path($path))) {
                    
107                return false;
                    
186    {
                    
187        if (isset($_REQUEST['elementor-preview'])) {
                    
188            return true;
                    
198     */
                    
199    public function is_preview_mode()
                    
200    {
                    
200    {
                    
201        if (isset($_REQUEST['elementor-preview'])) {
                    
202            return false;
                    
220        if (!function_exists('get_plugins')) {
                    
221            include_once ABSPATH . '/wp-admin/includes/plugin.php';
                    
222        }
                    
                
Config.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 319 lines
                    
27    function __construct($master = false, $blog_id = null) {
                    
28        $preview = w3_is_preview_mode();
                    
29        if (defined('WP_ADMIN')) {
                    
30            $config_admin = w3_instance('W3_ConfigAdmin');
                    
31            $preview = $config_admin->get_boolean('previewmode.enabled');
                    
32        }
                    
38            $this->_blog_id = $blog_id;
                    
39        $this->_preview = $preview;
                    
40        $this->load();
                    
86    function preview_production_copy($direction = 1, $remove_source = false) {
                    
87        $this->_get_writer()->preview_production_copy($direction, $remove_source);
                    
88
                    
295    private function _get_config_filename($forced_preview = null, $master = false) {
                    
296        $preview = (is_null($forced_preview) ? $this->_preview : $forced_preview);
                    
297        $postfix = ($preview ? '-preview' : '') . '.php';
                    
                
class.php https://github.com/exponentcms/exponent-cms-1.git | PHP | 159 lines
                    
1<?php
                    
2
                    
20class swfmodule {
                    
21	function name() { return exponent_lang_loadKey('modules/swfmodule/class.php','module_name'); }
                    
22	function author() { return 'Greg Otte'; }
                    
22	function author() { return 'Greg Otte'; }
                    
23	function description() { return exponent_lang_loadKey('modules/swfmodule/class.php','module_description'); }
                    
24	
                    
31	function permissions($internal = '') {
                    
32		$i18n = exponent_lang_loadFile('modules/swfmodule/class.php');
                    
33		
                    
54			
                    
55		if (defined('PREVIEW_READONLY') && !defined('SELECTOR')) {
                    
56			return;
                    
57		} 
                    
58		if (!defined('SYS_FILES')) require_once(BASE.'subsystems/files.php');
                    
59		$directory = 'files/swfmodule/' . $location->src;
                    
                
autoloader.php https://gitlab.com/campus-academy/krowkaramel | PHP | 311 lines
                    
115			'Base_Control' => 'includes/controls/base.php',
                    
116			'Base_Data_Control' => 'includes/controls/base-data.php',
                    
117			'Base_UI_Control' => 'includes/controls/base-ui.php',
                    
117			'Base_UI_Control' => 'includes/controls/base-ui.php',
                    
118			'Beta_Testers' => 'includes/beta-testers.php',
                    
119			'Compatibility' => 'includes/compatibility.php',
                    
134			'Maintenance_Mode' => 'includes/maintenance-mode.php',
                    
135			'Preview' => 'includes/preview.php',
                    
136			'Rollback' => 'includes/rollback.php',
                    
136			'Rollback' => 'includes/rollback.php',
                    
137			'Settings' => 'includes/settings/settings.php',
                    
138			'Settings_Controls' => 'includes/settings/controls.php',
                    
155			'Widget_WordPress' => 'includes/widgets/wordpress.php',
                    
156			'Widgets_Manager' => 'includes/managers/widgets.php',
                    
157			'WordPress_Widgets_Manager' => 'includes/managers/wordpress-widgets.php',
                    
                
index.php https://github.com/scoates/blogcollab.git | PHP | 211 lines
                    
1<?php
                    
2/**
                    
5 * spent a whole bunch more time making it ready for public consumption), but
                    
6 * the app is really useful for collaboration/preview.
                    
7 *
                    
22 */
                    
23require dirname(__DIR__) . DIRECTORY_SEPARATOR . 'blogcollab.php';
                    
24
                    
29	if (
                    
30		isset($_SERVER['PHP_AUTH_USER'])
                    
31		&& AUTH_USER == $_SERVER['PHP_AUTH_USER']
                    
31		&& AUTH_USER == $_SERVER['PHP_AUTH_USER']
                    
32		&& isset($_SERVER['PHP_AUTH_PW'])
                    
33		&& AUTH_PASS == md5($_SERVER['PHP_AUTH_PW'])
                    
178$displayTemplate = $who;
                    
179if (!in_array($displayTemplate . '.html.php', $templates)) {
                    
180	$displayTemplate = null;
                    
                
list_cat_posts.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 132 lines
                    
1<?php
                    
2/*
                    
28//Sidebar Widget:
                    
29include('list_cat_posts_widget.php');
                    
30
                    
82		// File locations lower in list override others
                    
83		dirname(__FILE__).'/templates/'.$atts['template'].'.php',
                    
84		STYLESHEETPATH.'/list-category-posts/'.$atts['template'].'.php',
                    
86	foreach($possibleTemplates as $key => $file) {
                    
87		if (is_readable($file)) {
                    
88			$tplFileName = $file;
                    
90	}
                    
91	if ((!empty($tplFileName)) && (is_readable($tplFileName))) {
                    
92		require($tplFileName);
                    
124function lcp_add_option_page(){
                    
125	add_options_page('List Category Posts', 'List Category Posts', 'manage_options','list-category-posts/list_cat_posts_options.php');
                    
126}
                    
                
image.class.php http://jqbird.googlecode.com/svn/trunk/ | PHP | 232 lines
                    
1<?php
                    
2class image
                    
61
                    
62	function thumb($thumbwidth, $thumbheight, $preview = 0)
                    
63	{
                    
63	{
                    
64		$this->thumb_gd($thumbwidth, $thumbheight, $preview);
                    
65
                    
72
                    
73	function watermark($preview = 0)
                    
74	{
                    
78		}
                    
79		$this->watermark_gd($preview);
                    
80	}
                    
81
                    
82	function thumb_gd($thumbwidth, $thumbheight, $preview = 0)
                    
83	{
                    
                
ConfigCompiler.php https://gitlab.com/karlen/ayo_wp | PHP | 396 lines
                    
5	private $_blog_id;
                    
6	private $_preview;
                    
7
                    
93
                    
94	public function __construct( $blog_id, $preview ) {
                    
95		$this->_blog_id = $blog_id;
                    
95		$this->_blog_id = $blog_id;
                    
96		$this->_preview = $preview;
                    
97
                    
150			$child_filename = Config::util_config_filename_legacy(
                    
151				$this->_blog_id, $this->_preview );
                    
152			$data = self::util_array_from_file_legacy( $child_filename );
                    
188			// write only overwrited keys
                    
189			$master = new ConfigCompiler( 0, $this->_preview );
                    
190			$master->load();
                    
                
Config.php https://gitlab.com/karlen/ayo_wp | PHP | 373 lines
                    
31	static public function util_array_from_file( $filename ) {
                    
32		if ( file_exists( $filename ) && is_readable( $filename ) ) {
                    
33			// including file directly instead of read+eval causes constant
                    
52	static public function util_config_filename( $blog_id, $preview ) {
                    
53		$postfix = ( $preview ? '-preview' : '' ) . '.json';
                    
54
                    
68	static public function util_config_filename_legacy( $blog_id, $preview ) {
                    
69		$postfix = ( $preview ? '-preview' : '' ) . '.php';
                    
70
                    
91
                    
92		$this->_preview = Util_Environment::is_preview_mode();
                    
93		$this->load();
                    
239	 */
                    
240	public function is_preview() {
                    
241		return $this->_preview;
                    
                
product.php https://github.com/gobsInternetTechnologyGmbH/private_sales.git | PHP | 72 lines
                    
1<?php
                    
2/* vim: set ts=4 sw=4 sts=4 et: */
                    
10| FILE PROVIDED WITH THIS DISTRIBUTION. THE AGREEMENT TEXT IS ALSO AVAILABLE  |
                    
11| AT THE FOLLOWING URL: http://www.x-cart.com/license.php                     |
                    
12|                                                                             |
                    
34/**
                    
35 * Product preview interface
                    
36 *
                    
41 * @copyright  Copyright (c) 2001-2011 Ruslan R. Fazlyev <rrf@x-cart.com>
                    
42 * @license    http://www.x-cart.com/license.php X-Cart license agreement
                    
43 * @version    $Id: product.php,v 1.53.2.1 2011/01/10 13:11:46 ferz Exp $
                    
47
                    
48require './auth.php';
                    
49
                    
64        file_exists($xcart_dir . '/modules/gold_display.php')
                    
65        && is_readable($xcart_dir . '/modules/gold_display.php')
                    
66    ) {
                    
                
class.php https://github.com/exponentcms/exponent-cms-1.git | PHP | 102 lines
                    
1<?php
                    
2
                    
20class administrationmodule {
                    
21	function name() { return exponent_lang_loadKey('modules/administrationmodule/class.php','module_name'); }
                    
22	function author() { return 'OIC Group, Inc'; }
                    
22	function author() { return 'OIC Group, Inc'; }
                    
23	function description() { return exponent_lang_loadKey('modules/administrationmodule/class.php','module_description'); }
                    
24	
                    
40			while (($file = readdir($dh)) !== false) {
                    
41				if (substr($file,-4,4) == '.php' && is_readable($dir.'/'.$file) && is_file($dir.'/'.$file)) {
                    
42					$menu = array_merge($menu,include($dir.'/'.$file));
                    
73			while (($file = readdir($dh)) !== false) {
                    
74				if (substr($file,-4,4) == '.php' && is_readable($dir.'/'.$file) && is_file($dir.'/'.$file)) {
                    
75					$menu = array_merge($menu,include($dir.'/'.$file));
                    
87		$template->assign('title',$title);
                    
88		$template->assign('previewMode',($level == UILEVEL_PREVIEW));
                    
89		
                    
                
product.php https://github.com/DX66/private_sales.git | PHP | 67 lines
                    
1<?php
                    
2/* vim: set ts=4 sw=4 sts=4 et: */
                    
10| FILE PROVIDED WITH THIS DISTRIBUTION. THE AGREEMENT TEXT IS ALSO AVAILABLE  |
                    
11| AT THE FOLLOWING URL: http://www.x-cart.com/license.php                     |
                    
12|                                                                             |
                    
34/**
                    
35 * Product preview interface
                    
36 *
                    
41 * @copyright  Copyright (c) 2001-2011 Ruslan R. Fazlyev <rrf@x-cart.com>
                    
42 * @license    http://www.x-cart.com/license.php X-Cart license agreement
                    
43 * @version    $Id: product.php,v 1.59.2.1 2011/01/10 13:12:09 ferz Exp $
                    
47
                    
48require './auth.php';
                    
49require $xcart_dir.'/include/security.php';
                    
60        file_exists($xcart_dir.'/modules/gold_display.php')
                    
61        && is_readable($xcart_dir.'/modules/gold_display.php')
                    
62    ) {
                    
                
index.php https://github.com/dragontech/frisan.git | PHP | 115 lines
                    
1<?php
                    
2
                    
11
                    
12$HeadURL: http://svn.textpattern.com/development/4.0/textpattern/index.php $
                    
13$LastChangedRevision: 1172 $
                    
26	ob_start(NULL, 2048);
                    
27	if (!@include './config.php') { 
                    
28		ob_end_clean();
                    
28		ob_end_clean();
                    
29		include txpath.'/setup/index.php';
                    
30		exit();
                    
33	header("Content-type: text/html; charset=utf-8");
                    
34	if (isset($_POST['preview'])) {
                    
35		include txpath.'/publish.php';
                    
42
                    
43	include_once txpath.'/lib/constants.php';
                    
44	include txpath.'/lib/txplib_db.php';
                    
                
pages_liste.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 111 lines
                    
1<?php
                    
2#              ACS
                    
86
                    
87  if (@is_dir($dir) AND @is_readable($dir) AND $d = @opendir($dir)) {
                    
88    while (($f = readdir($d)) !== false && ($nbfiles<1000)) {
                    
91      AND $f != 'remove.txt'
                    
92      AND @is_readable($p = "$dir/$f")) {
                    
93        if (is_file($p)) {
                    
97            		($pagename == 'acs.js') ||
                    
98            		((substr($pagename, -8) == '_preview') && (!$GLOBALS['meta']['ACS_VOIR_PAGES_PREVIEW'])) )
                    
99            	continue;
                    
                
lib.image.thumb.class.php http://php-ppcms.googlecode.com/svn/trunk/ | PHP | 331 lines
                    
1<?php
                    
2/***************************************************************
                    
74	
                    
75	function thumb($thumbwidth, $thumbheight, $preview = 0) {
                    
76		if( $this->imagelib == 'im' && $this->imageimpath ) {
                    
76		if( $this->imagelib == 'im' && $this->imageimpath ) {
                    
77			$this->_thumb_im($thumbwidth, $thumbheight, $preview);
                    
78		} else {
                    
78		} else {
                    
79			$this->_thumb_gd($thumbwidth, $thumbheight, $preview);
                    
80		}
                    
86	
                    
87	function watermark($preview = 0) {
                    
88		if( $watermarkminwidth && $this->attachinfo['0'] < $watermarkminwidth && $watermarkminheight && $this->attachinfo['1'] <= $watermarkminheight ) {
                    
95			} else {
                    
96				$this->_watermark_gd($preview);
                    
97			}
                    
                
Config.php https://bitbucket.org/bsnowman/classyblog.git | PHP | 262 lines
                    
25    function __construct($master = false) {
                    
26        $preview = w3_is_preview_mode();
                    
27        if (defined('WP_ADMIN')) {
                    
28            $config_admin = w3_instance('W3_ConfigAdmin');
                    
29            $preview = $config_admin->get_boolean('previewmode.enabled');
                    
30        }
                    
34            $this->_blog_id = w3_get_blog_id();
                    
35        $this->_preview = $preview;
                    
36        $this->load();
                    
78     * @param integer $direction +1: preview->production
                    
79     *                           -1: production->preview
                    
80     * @param boolean $remove_source remove source file
                    
238    private function _get_config_filename($forced_preview = null) {
                    
239        $preview = (is_null($forced_preview) ? $this->_preview : $forced_preview);
                    
240        $postfix = ($preview ? '-preview' : '') . '.php';
                    
                
index.php https://github.com/joebushi/textpattern.git | PHP | 142 lines
                    
1<?php
                    
2
                    
26	ob_start(NULL, 2048);
                    
27	if (!@include './config.php') {
                    
28		ob_end_clean();
                    
28		ob_end_clean();
                    
29		include txpath.'/setup/index.php';
                    
30		exit();
                    
33	header("Content-type: text/html; charset=utf-8");
                    
34	if (isset($_POST['form_preview'])) {
                    
35		include txpath.'/publish.php';
                    
42
                    
43	include_once txpath.'/lib/constants.php';
                    
44	include txpath.'/lib/txplib_misc.php';
                    
44	include txpath.'/lib/txplib_misc.php';
                    
45	include txpath.'/lib/txplib_db.php';
                    
46	include txpath.'/lib/txplib_forms.php';
                    
                
ext_imagick.cpp https://github.com/soitun/hiphop-php.git | C++ | 365 lines
                    
2   +----------------------------------------------------------------------+
                    
3   | HipHop for PHP                                                       |
                    
4   +----------------------------------------------------------------------+
                    
5   | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com)  |
                    
6   | Copyright (c) 1997-2010 The PHP Group                                |
                    
7   +----------------------------------------------------------------------+
                    
7   +----------------------------------------------------------------------+
                    
8   | This source file is subject to version 3.01 of the PHP license,      |
                    
9   | that is bundled with this package in the file LICENSE, and is        |
                    
10   | available through the world-wide-web at the following url:           |
                    
11   | http://www.php.net/license/3_01.txt                                  |
                    
12   | If you did not receive a copy of the PHP license and are unable to   |
                    
13   | obtain it through the world-wide-web, please send a note to          |
                    
14   | license@php.net so we can mail you a copy immediately.               |
                    
15   +----------------------------------------------------------------------+
                    
                
class.php https://github.com/exponentcms/exponent-cms-1.git | PHP | 163 lines
                    
1<?php
                    
2
                    
31	function permissions($internal = '') {
                    
32		$i18n = exponent_lang_loadFile('modules/swfmodule/class.php');
                    
33		
                    
54			
                    
55		if (defined('PREVIEW_READONLY') && !defined('SELECTOR')) {
                    
56			return;
                    
57		} 
                    
58		if (!defined('SYS_FILES')) require_once(BASE.'subsystems/files.php');
                    
59		$directory = 'files/mediaplayermodule/' . $location->src;
                    
91			$file = $db->selectObject('file','id='.$data->media_id);
                    
92			if ($file && is_readable(BASE.$file->directory.'/'.$file->filename)) {
                    
93				$data->_flashurl=$file->directory.'/'.$file->filename;
                    
97			$file = $db->selectObject('file','id='.$data->alt_image_id);
                    
98			if ($file && is_readable(BASE.$file->directory.'/'.$file->filename)) {
                    
99				$data->_noflashurl=$file->directory.'/'.$file->filename;
                    
                
exponent.php https://github.com/exponentcms/exponent-cms-1.git | PHP | 154 lines
                    
29// Bootstrap, which will clean the _POST, _GET and _REQUEST arrays, and include 
                    
30// necessary setup files (exponent_setup.php, exponent_variables.php) as well as initialize
                    
31// the compatibility layer.
                    
32// This was moved into its own file from this file so that 'lighter' scripts could bootstrap.
                    
33include_once(dirname(__realpath(__FILE__)).'/exponent_bootstrap.php');
                    
34
                    
38// Initialize the Sessions Subsystem
                    
39require_once(BASE.'subsystems/sessions.php');
                    
40// Initializes the session.  This will populate the $user variable
                    
58	 * The directory and class name of the current active theme.  This may be different
                    
59	 * than the configure theme (DISPLAY_THEME_REAL) due to previewing.
                    
60	 */
                    
89if (!defined('MIMEICON_RELATIVE')) {
                    
90	if (is_readable(THEME_ABSOLUTE.'mimetypes/')) {
                    
91		/* exdoc
                    
                
CaptchaFontPreview.php https://gitlab.com/Drulenium-bot/captcha | PHP | 73 lines
                    
1<?php
                    
2
                    
8/**
                    
9 * A Controller to preview the captcha font on the settings page.
                    
10 */
                    
10 */
                    
11class CaptchaFontPreview extends StreamedResponse {
                    
12
                    
24      $fonts = \Drupal::config('image_captcha.settings')
                    
25        ->get('image_captcha_fonts_preview_map_cache');
                    
26      if (!isset($fonts[$token])) {
                    
32      // Some sanity checks if the given font is valid.
                    
33      if (!is_file($font) || !is_readable($font)) {
                    
34        echo 'bad font';
                    
38
                    
39    // Settings of the font preview.
                    
40    $width = 120;
                    
                
functions.php https://github.com/jbreitenbucher/GenesisChildThemes.git | PHP | 140 lines
                    
1<?php
                    
2/** Start the engine */
                    
2/** Start the engine */
                    
3require_once( TEMPLATEPATH . '/lib/init.php' );
                    
4
                    
24/**
                    
25 * Register a custom admin callback to display the custom header preview with the
                    
26 * same style as is shown on the front end.
                    
52	$locale = get_locale();
                    
53	$locale_file = TEMPLATEPATH . "/languages/$locale.php";
                    
54	if ( is_readable( $locale_file ) )
                    
107function dm_include_branding() {
                    
108    require_once(CHILD_DIR . '/branding.php');
                    
109}
                    
                
Tools.php https://github.com/seotoaster-team/seotoaster.git | PHP | 285 lines
                    
64        );
                    
65        $pathPreview = ($croped) ? $websiteHelper->getPreviewCrop() : $websiteHelper->getPreview();
                    
66        if ($croped && $cropSizeSubfolder != '') {
                    
73            if (is_file($fullPath) && is_readable($fullPath)) {
                    
74                $infoPreview['path']     = $pathPreview.$page->getPreviewImage();
                    
75                $infoPreview['fullPath'] = $fullPath;
                    
92		try {
                    
93            $previews      = Tools_Filesystem_Tools::findFilesByExtension($websiteHelper->getPath() . (($croped) ? $websiteHelper->getPreviewCrop() :$websiteHelper->getPreview()), 'jpg|png|jpeg|gif', true, true, false);
                    
94        } catch (Exceptions_SeotoasterException $se) {
                    
201        $pageUrl            = str_replace(DIRECTORY_SEPARATOR, '-', $pageHelper->clean($pageUrl));
                    
202        $previewPath        = $websiteHelper->getPath() . $websiteHelper->getPreview();
                    
203
                    
208            $tmpPreviewFile = str_replace($websiteHelper->getUrl(), $websiteHelper->getPath(), $tmpPreviewFile);
                    
209            if (is_file($tmpPreviewFile) && is_readable($tmpPreviewFile)){
                    
210                preg_match('/\.[\w]{2,6}$/', $tmpPreviewFile, $extension);
                    
                
ml-slider.php https://bitbucket.org/minhnguyen19942/batdongsan.git | PHP | 2068 lines
                    
97            'metaflexslider'         => METASLIDER_PATH . 'inc/slider/metaslider.flex.class.php',
                    
98            'metanivoslider'         => METASLIDER_PATH . 'inc/slider/metaslider.nivo.class.php',
                    
99            'metaresponsiveslider'   => METASLIDER_PATH . 'inc/slider/metaslider.responsive.class.php',
                    
105            'simple_html_dom'        => METASLIDER_PATH . 'inc/simple_html_dom.php',
                    
106            'metaslider_notices'     => METASLIDER_PATH . 'admin/Notices.php',
                    
107            'metaslider_admin_pages' => METASLIDER_PATH . 'admin/Pages.php',
                    
182
                    
183        add_action('admin_post_metaslider_preview', array($this, 'do_preview'));
                    
184        add_action('admin_post_metaslider_switch_view', array($this, 'switch_view'));
                    
387    /**
                    
388     * Outputs a blank page containing a slideshow preview (for use in the 'Preview' iFrame)
                    
389     */
                    
412                <body>
                    
413                    <?php echo do_shortcode("[metaslider id={$id}]"); ?>
                    
414                    <?php wp_footer(); ?>
                    
                
template.php https://github.com/bng5/CMS.git | PHP | 1035 lines
                    
1<?php
                    
2/**
                    
9  if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/');
                    
10  require_once(DOKU_CONF.'dokuwiki.php');
                    
11
                    
21
                    
22  if(@is_readable(DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$tpl))
                    
23    return DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$tpl;
                    
32 * (defined by the global $ACT var) by calling the appropriate
                    
33 * outputfunction(s) from html.php
                    
34 *
                    
65      break;
                    
66    case 'preview':
                    
67      html_edit($TEXT);
                    
194  $head['link'][] = array( 'rel'=>'search', 'type'=>'application/opensearchdescription+xml',
                    
195                           'href'=>DOKU_BASE.'lib/exe/opensearch.php', 'title'=>$conf['title'] );
                    
196  $head['link'][] = array( 'rel'=>'start', 'href'=>DOKU_BASE );
                    
                
functions.php https://gitlab.com/gthemes/andante_wp | PHP | 705 lines
                    
1<?php
                    
2
                    
24    $locale = get_locale();
                    
25    $locale_file = get_template_directory() . "/languages/$locale.php";
                    
26    if (is_readable($locale_file))
                    
70        // 'wp-head-callback' => 'twentyeleven_header_style',
                    
71        // Callback for styling the header preview in the admin.
                    
72        // 'admin-head-callback' => 'twentyeleven_admin_header_style',
                    
72        // 'admin-head-callback' => 'twentyeleven_admin_header_style',
                    
73        // Callback used to display the header preview in the admin.
                    
74        // 'admin-preview-callback' => 'twentyeleven_admin_header_image',
                    
100        // 'admin-head-callback'    => '',
                    
101        // 'admin-preview-callback' => ''
                    
102    );
                    
136            'title' => __('Theme Options', 'theme_admin'),
                    
137            'href'  => site_url() .'/wp-admin/themes.php?page=yo-theme-options',
                    
138            'meta'  => array('title' => __('Click to edit the theme options', 'theme_admin'))
                    
                
Observer.php https://bitbucket.org/maconeto/proman.git | PHP | 186 lines
                    
1<?php
                    
2
                    
17
                    
18        // check if it is success page preview
                    
19        $orderToPreview = $observer->getControllerAction()->getRequest()
                    
19        $orderToPreview = $observer->getControllerAction()->getRequest()
                    
20            ->getParam('previewObjectId');
                    
21        if ($orderToPreview) {
                    
21        if ($orderToPreview) {
                    
22            $this->_initPreviewSuccessPage($orderToPreview);
                    
23        }
                    
101                $absolutePath = $baseDir . '/skin/frontend/' . $matches[1];
                    
102                if (is_readable($absolutePath)) {
                    
103                    $head->addItem($type, $file, "");
                    
108
                    
109    protected function _initPreviewSuccessPage($idToPreview)
                    
110    {
                    
                
class.geshistyler.php http://jfxcms.googlecode.com/svn/ | PHP | 640 lines
                    
1<?php
                    
2/**
                    
4 * <pre>
                    
5 *   File:   geshi/classes/class.geshicodecontext.php
                    
6 *   Author: Nigel McNie
                    
33 * @copyright  (C) 2004 - 2006 Nigel McNie
                    
34 * @version    $Id: class.geshistyler.php 2139 2009-07-22 21:40:26Z benbe $
                    
35 *
                    
228            foreach ($this->themes as $theme) {
                    
229                $theme_file = GESHI_THEMES_ROOT . $theme . GESHI_DIR_SEP . $language . '.php';
                    
230                if (is_readable($theme_file)) {
                    
259            /** Get the GeSHiCodeParser class */
                    
260            require_once GESHI_CLASSES_ROOT . 'class.geshicodeparser.php';
                    
261            /** Get the default code parser class */
                    
261            /** Get the default code parser class */
                    
262            require_once GESHI_CLASSES_ROOT . 'class.geshidefaultcodeparser.php';
                    
263            $this->_codeParser = new GeSHiDefaultCodeParser($this, $this->language);
                    
                
video_views_handler_field_data.inc git://pkgs.fedoraproject.org/drupal6-video | Pascal | 59 lines
                    
1<?php
                    
2
                    
27    // Some formatters need to behave differently depending on the build_mode
                    
28    // (for instance: preview), so we provide one.
                    
29    $node->build_mode = NODE_BUILD_NORMAL;
                    
41    $item['filemime'] = file_get_mimetype($file['basename']);
                    
42    $item['filesize'] = is_readable($filepath) ? filesize($filepath) : 0;
                    
43
                    
                
image.class.php https://gitlab.com/BGCX262/zyyhong-svn-to-git.git | PHP | 294 lines
                    
57
                    
58	function Thumb($thumbwidth, $thumbheight, $preview = 0) {
                    
59		global $imagelib, $imageimpath, $thumbstatus, $watermarkstatus;
                    
59		global $imagelib, $imageimpath, $thumbstatus, $watermarkstatus;
                    
60		$imagelib && $imageimpath ? $this->Thumb_IM($thumbwidth, $thumbheight, $preview) : $this->Thumb_GD($thumbwidth, $thumbheight, $preview);
                    
61		if($thumbstatus == 2 && $watermarkstatus) {
                    
66
                    
67	function Watermark($preview = 0) {
                    
68		global $imagelib, $imageimpath, $watermarktype, $watermarktext, $watermarkminwidth, $watermarkminheight;
                    
71		}
                    
72		$imagelib && $imageimpath ? $this->Watermark_IM($preview) : $this->Watermark_GD($preview);
                    
73	}
                    
97
                    
98				$targetfile = !$preview ? ($thumbstatus == 1 ? $this->targetfile.'.thumb.jpg' : $this->targetfile) : DISCUZ_ROOT.'./forumdata/watermark_temp.jpg';
                    
99
                    
                
ConfigCompiler.php https://bitbucket.org/reareaf/wp-re.git | PHP | 455 lines
                    
5	private $_blog_id;
                    
6	private $_preview;
                    
7
                    
93
                    
94	public function __construct( $blog_id, $preview ) {
                    
95		$this->_blog_id = $blog_id;
                    
95		$this->_blog_id = $blog_id;
                    
96		$this->_preview = $preview;
                    
97
                    
148			$child_filename = Config::util_config_filename_legacy_v2(
                    
149				$this->_blog_id, $this->_preview );
                    
150			$data = self::util_array_from_file_legacy_v2( $child_filename );
                    
186			// write only overwrited keys
                    
187			$master = new ConfigCompiler( 0, $this->_preview );
                    
188			$master->load();
                    
                
ImageUtil.php https://gitlab.com/indybay/indybay-active.git | PHP | 473 lines
                    
1<?php
                    
2
                    
10 *
                    
11 * This is mainly just a series of wrappers around php functions that may be
                    
12 * useful if we ever want to change which functions are used.
                    
182    if (file_exists($existing_full_file_path)) {
                    
183      if (!is_readable($existing_full_file_path)) {
                    
184        sleep(5);
                    
185      }
                    
186      if (!is_readable($existing_full_file_path)) {
                    
187        echo '<!--Couldnt read file to convert to pdf-->';
                    
330  /**
                    
331   * Makes preview version of non-browser-playable video.
                    
332   */
                    
335    $existing_full_file_path = UPLOAD_PATH . '/' . $file_info['relative_path'] . $file_info['file_name'];
                    
336    $suffix = '_preview_.mp4';
                    
337    if (!file_exists($existing_full_file_path . $suffix)) {
                    
                
ConfigCompiler.php https://bitbucket.org/reareaf/blubberwasser-com.git | PHP | 455 lines
                    
5	private $_blog_id;

                    
6	private $_preview;

                    
7

                    
93

                    
94	public function __construct( $blog_id, $preview ) {

                    
95		$this->_blog_id = $blog_id;

                    
95		$this->_blog_id = $blog_id;

                    
96		$this->_preview = $preview;

                    
97

                    
148			$child_filename = Config::util_config_filename_legacy_v2(

                    
149				$this->_blog_id, $this->_preview );

                    
150			$data = self::util_array_from_file_legacy_v2( $child_filename );

                    
186			// write only overwrited keys

                    
187			$master = new ConfigCompiler( 0, $this->_preview );

                    
188			$master->load();

                    
                
ml-slider.php https://gitlab.com/gevvvvv/Tumo-Workshop-Cafe.git | PHP | 1723 lines
                    
95            'metaslidersystemcheck' => METASLIDER_PATH . 'inc/metaslider.systemcheck.class.php',
                    
96            'metaslider_widget'     => METASLIDER_PATH . 'inc/metaslider.widget.class.php',
                    
97            'simple_html_dom'       => METASLIDER_PATH . 'inc/simple_html_dom.php'
                    
111
                    
112            // >= PHP 5.2 - Use auto loading
                    
113            if ( function_exists( "__autoload" ) ) {
                    
173        add_action( 'media_upload_layer', array( $this, 'upgrade_to_pro_tab' ) );
                    
174        add_action( 'admin_post_metaslider_preview', array( $this, 'do_preview' ) );
                    
175        add_action( 'widgets_init', array( $this, 'register_metaslider_widget' ) );
                    
392                'addslide_nonce' => wp_create_nonce( 'metaslider_addslide' ),
                    
393                'iframeurl' => admin_url( 'admin-post.php?action=metaslider_preview' ),
                    
394                'useWithCaution' => __( "Caution: This setting is for advanced developers only. If you're unsure, leave it checked.", "metaslider" )
                    
401    /**
                    
402     * Outputs a blank page containing a slideshow preview (for use in the 'Preview' iFrame)
                    
403     */
                    
                
class-admin.php https://gitlab.com/sksabir/support4planet | PHP | 453 lines
                    
1<?php
                    
2
                    
280				],
                    
281				'preview_url'  => static::demo_site_url(
                    
282					[
                    
292				),
                    
293				'ajax_url'             => admin_url( 'admin-ajax.php' ),
                    
294				'customizer_url'       => wpem_get_customizer_url(
                    
388
                    
389		$template = wpem()->base_dir . 'templates/fullscreen.php';
                    
390
                    
390
                    
391		if ( is_readable( $template ) ) {
                    
392
                    
                
fonctions.php git://github.com/Dolibarr/dolibarr.git | PHP | 274 lines
                    
1<?php
                    
2/* Copyright (C) 2013 Laurent Destailleur  <eldy@users.sourceforge.net>
                    
19/**
                    
20 *	\file       htdocs/opensurvey/fonctions.php
                    
21 *	\ingroup    opensurvey
                    
38
                    
39	$head[0][0] = 'card.php?id='.$object->id_sondage;
                    
40	$head[0][1] = $langs->trans("Survey");
                    
43
                    
44	$head[1][0] = 'results.php?id='.$object->id_sondage;
                    
45	$head[1][1] = $langs->trans("SurveyResults");
                    
45	$head[1][1] = $langs->trans("SurveyResults");
                    
46	$head[1][2] = 'preview';
                    
47	$h++;
                    
50	// Entries must be declared in modules descriptor with line
                    
51	// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__');   to add new tab
                    
52	// $this->tabs = array('entity:-tabname);   												to remove a tab
                    
                
ConfigCompiler.php https://bitbucket.org/dimonkok/hal.git | PHP | 451 lines
                    
77	static private function util_array_from_file_legacy_v1( $filename ) {
                    
78		if ( file_exists( $filename ) && is_readable( $filename ) ) {
                    
79			// including file directly instead of read+eval causes constant
                    
98	static private function util_array_from_file_legacy_v2( $filename ) {
                    
99		if ( file_exists( $filename ) && is_readable( $filename ) ) {
                    
100			// including file directly instead of read+eval causes constant
                    
116		$this->_blog_id = $blog_id;
                    
117		$this->_preview = $preview;
                    
118
                    
132		// apply data from master config
                    
133		$master_filename = Config::util_config_filename( 0, $this->_preview );
                    
134		$data = Config::util_array_from_file( $master_filename );
                    
178			$child_filename = Config::util_config_filename_legacy_v2(
                    
179				$this->_blog_id, $this->_preview );
                    
180			$data = self::util_array_from_file_legacy_v2( $child_filename );
                    
                
ml-slider.php https://bitbucket.org/NavilSN/cfsme-compass.git | PHP | 1994 lines
                    
92            'metaresponsiveslider'   => METASLIDER_PATH . 'inc/slider/metaslider.responsive.class.php',
                    
93            'metaslide'              => METASLIDER_PATH . 'inc/slide/metaslide.class.php',
                    
94            'metaimageslide'         => METASLIDER_PATH . 'inc/slide/metaslide.image.class.php',
                    
98            'simple_html_dom'        => METASLIDER_PATH . 'inc/simple_html_dom.php',
                    
99            'metaslider_notices'     => METASLIDER_PATH . 'admin/Notices.php',
                    
100            'metaslider_admin_pages' => METASLIDER_PATH . 'admin/Pages.php',
                    
100            'metaslider_admin_pages' => METASLIDER_PATH . 'admin/Pages.php',
                    
101            'metaslider_tour'        => METASLIDER_PATH . 'admin/Tour.php'
                    
102        );
                    
173
                    
174        add_action('admin_post_metaslider_preview', array($this, 'do_preview'));
                    
175        add_action('admin_post_metaslider_switch_view', array($this, 'switch_view'));
                    
377    /**
                    
378     * Outputs a blank page containing a slideshow preview (for use in the 'Preview' iFrame)
                    
379     */
                    
                
image.class.php https://github.com/gcao/bbs.git | PHP | 350 lines
                    
61
                    
62	function Thumb($thumbwidth, $thumbheight, $preview = 0) {
                    
63		global $imagelib, $imageimpath, $thumbstatus, $watermarkstatus;
                    
63		global $imagelib, $imageimpath, $thumbstatus, $watermarkstatus;
                    
64		$imagelib && $imageimpath ? $this->Thumb_IM($thumbwidth, $thumbheight, $preview) : $this->Thumb_GD($thumbwidth, $thumbheight, $preview);
                    
65		if($thumbstatus == 2 && $watermarkstatus) {
                    
70
                    
71	function Watermark($preview = 0) {
                    
72		global $imagelib, $imageimpath, $watermarktype, $watermarktext, $watermarkminwidth, $watermarkminheight;
                    
75		}
                    
76		$imagelib && $imageimpath ? $this->Watermark_IM($preview) : $this->Watermark_GD($preview);
                    
77	}
                    
102
                    
103					$targetfile = !$preview ? ($thumbstatus == 1 ? $this->targetfile.'.thumb.jpg' : $this->targetfile) : DISCUZ_ROOT.'./forumdata/watermark_temp.jpg';
                    
104					$cx = $img_w;
                    
                
Config.php https://bitbucket.org/reareaf/blubberwasser-com.git | PHP | 419 lines
                    
37		// config cache enabled

                    
38		$config = ConfigCache::util_array_from_storage( $blog_id, $preview );

                    
39		if ( !is_null( $config ) ) {

                    
42

                    
43		$config = self::_util_array_from_storage( $blog_id, $preview );

                    
44		ConfigCache::save_item( $blog_id, $preview, $config );

                    
77	static public function util_config_filename( $blog_id, $preview ) {

                    
78		$postfix = ( $preview ? '-preview' : '' ) . '.php';

                    
79

                    
93	static public function util_config_filename_legacy_v2( $blog_id, $preview ) {

                    
94		$postfix = ( $preview ? '-preview' : '' ) . '.json';

                    
95

                    
116

                    
117		$this->_preview = Util_Environment::is_preview_mode();

                    
118		$this->load();

                    
                
Config.php https://bitbucket.org/reareaf/wp-re.git | PHP | 419 lines
                    
37		// config cache enabled
                    
38		$config = ConfigCache::util_array_from_storage( $blog_id, $preview );
                    
39		if ( !is_null( $config ) ) {
                    
42
                    
43		$config = self::_util_array_from_storage( $blog_id, $preview );
                    
44		ConfigCache::save_item( $blog_id, $preview, $config );
                    
77	static public function util_config_filename( $blog_id, $preview ) {
                    
78		$postfix = ( $preview ? '-preview' : '' ) . '.php';
                    
79
                    
93	static public function util_config_filename_legacy_v2( $blog_id, $preview ) {
                    
94		$postfix = ( $preview ? '-preview' : '' ) . '.json';
                    
95
                    
116
                    
117		$this->_preview = Util_Environment::is_preview_mode();
                    
118		$this->load();
                    
                
msfile.php https://gitlab.com/chandanpasunoori/multimerch | PHP | 300 lines
                    
1<?php
                    
2class MsFile extends Model {
                    
280			$full_path = $dir . $value;
                    
281			if (is_dir($full_path) && is_readable($full_path)) {
                    
282				$this->getPredefinedAvatars($path . $value . '/');
                    
282				$this->getPredefinedAvatars($path . $value . '/');
                    
283			} elseif (is_file($full_path) && is_readable($full_path)) {
                    
284				$category = basename(dirname($full_path));
                    
291					'dir' => $this->config->get('msconf_predefined_avatars_path') . $path, // image can be placed in any subfolder level, so dir not always the same as category
                    
292					'image' => $this->resizeImage($this->config->get('msconf_predefined_avatars_path') . $path . $value, $this->config->get('msconf_preview_seller_avatar_image_width'), $this->config->get('msconf_preview_seller_avatar_image_height'))
                    
293				);
                    
                
forum_post.php https://github.com/e107/e107.git | PHP | 710 lines
                    
136
                    
137if (is_readable(e_ADMIN.'filetypes.php')) {
                    
138	$a_filetypes = trim(file_get_contents(e_ADMIN.'filetypes.php'));
                    
192	{
                    
193		if (file_exists(THEME."forum_preview_template.php"))
                    
194		{
                    
194		{
                    
195			require_once(THEME."forum_preview_template.php");
                    
196		}
                    
198		{
                    
199			require_once(e_PLUGIN."forum/templates/forum_preview_template.php");
                    
200		}
                    
474{
                    
475	if (is_readable(THEME."forum_post_template.php"))
                    
476	{
                    
                
ibrowser.php https://github.com/e107/e107.git | PHP | 516 lines
                    
34
                    
35include 'config.php';
                    
36
                    
73$errors = array();
                    
74if(is_readable("langs/".e_LANGUAGE.".php"))
                    
75{
                    
281	  // 	alert('<?php echo $tinyMCE_base_url.$imglib?>' + formObj.src.value);
                    
282		if (splitvar[3]) imgpreview.location.href = '<?php echo $tinyMCE_base_url.$imglib?>' + formObj.src.value;
                    
283	}
                    
314            <td>&nbsp;</td>
                    
315            <td style='border:0px;text-align:left;vertical-align:top' rowspan=\"3\"><iframe name=\"imgpreview\" id=\"imgpreview\" class=\"previewWindow\" src=\"".$preview."\" style=\"border:0px;width: 100%; height: 220px;overflow:auto\" ></iframe>
                    
316            </td>
                    
408            <td rowspan=\"8\" style='text-align:left;vertical-align:top;width:210px;overflow:hidden'>
                    
409			<div id=\"stylepreview\" style=\"padding:10px; width: 200px; height:100%; overflow:hidden; background-color:#ffffff; font-size:8px\" class=\"previewWindow\">
                    
410                <p><img id=\"wrap\" src=\"images/textflow.gif\" width=\"45\" height=\"45\" alt=\"\" style=\"border:0px solid black; float:none; 
                    
                
autoloader.php https://bitbucket.org/hcdesenvolvimentos/tiagobalabuch_site.git | PHP | 262 lines
                    
1<?php
                    
2namespace Elementor;
                    
31	private static $classes_map = [
                    
32		'Admin' => 'includes/admin.php',
                    
33		'Api' => 'includes/api.php',
                    
33		'Api' => 'includes/api.php',
                    
34		'Base_Control' => 'includes/controls/base.php',
                    
35		'Base_Data_Control' => 'includes/controls/base-data.php',
                    
35		'Base_Data_Control' => 'includes/controls/base-data.php',
                    
36		'Base_UI_Control' => 'includes/controls/base-ui.php',
                    
37		'Beta_Testers' => 'includes/beta-testers.php',
                    
37		'Beta_Testers' => 'includes/beta-testers.php',
                    
38		'Compatibility' => 'includes/compatibility.php',
                    
39		'Conditions' => 'includes/conditions.php',
                    
64		'Posts_CSS_Manager' => 'includes/managers/css-files.php',
                    
65		'Preview' => 'includes/preview.php',
                    
66		'Rollback' => 'includes/rollback.php',
                    
                
PluginController.php https://github.com/seotoaster-team/seotoaster.git | PHP | 276 lines
                    
1<?php
                    
2
                    
43            $readmeText = '';
                    
44            if (is_readable($readmePath)) {
                    
45                $readmeText =nl2br(htmlspecialchars(file_get_contents($readmePath)));
                    
61				$plugin      = Tools_Plugins_Tools::findPluginByName($pluginName);
                    
62				$preview     = $plugin->getPreview();
                    
63				$previewPath = str_replace($this->_helper->website->getUrl(), $this->_helper->website->getPath(), $preview);
                    
63				$previewPath = str_replace($this->_helper->website->getUrl(), $this->_helper->website->getPath(), $preview);
                    
64				if(!$preview || !file_exists($previewPath)) {
                    
65					$plugin->setPreview($this->_helper->website->getUrl() . 'system/images/noimage.png');
                    
                
functions.php https://gitlab.com/zamuro57/project-ar2.git | PHP | 151 lines
                    
1<?php
                    
2define ( 'AR2_CHILD', is_child_theme() );
                    
22	/* Load theme options */
                    
23	require_once AR2_LIB . '/options.php';
                    
24	
                    
25	/* Post Views API */
                    
26	require_once AR2_LIB . '/postviews.php';
                    
27	
                    
28	/* Load theme library files */
                    
29	require_once AR2_LIB . '/actions.php';
                    
30	require_once AR2_LIB . '/filters.php';
                    
30	require_once AR2_LIB . '/filters.php';
                    
31	require_once AR2_LIB . '/template.php';
                    
32	require_once AR2_LIB . '/thumbnails.php';
                    
32	require_once AR2_LIB . '/thumbnails.php';
                    
33	require_once AR2_LIB . '/styles.php';
                    
34	require_once AR2_LIB . '/widgets.php';
                    
                
autoloader.php https://bitbucket.org/zshi0001/fit5120-kic.git | PHP | 209 lines
                    
32		'Base_Control' => 'includes/controls/base.php',
                    
33		'Base_Data_Control' => 'includes/controls/base-data.php',
                    
34		'Base_UI_Control' => 'includes/controls/base-ui.php',
                    
43		'DB' => 'includes/db.php',
                    
44		'Debug\Debug' => 'includes/debug/debug.php',
                    
45		'Editor' => 'includes/editor.php',
                    
61		'Maintenance' => 'includes/maintenance.php',
                    
62		'Maintenance_Mode' => 'includes/maintenance-mode.php',
                    
63		'Post_CSS_File' => 'includes/css-file/post-css-file.php',
                    
63		'Post_CSS_File' => 'includes/css-file/post-css-file.php',
                    
64		'Post_Preview_CSS' => 'includes/css-file/post-preview-css.php',
                    
65		'Posts_CSS_Manager' => 'includes/managers/css-files.php',
                    
65		'Posts_CSS_Manager' => 'includes/managers/css-files.php',
                    
66		'Preview' => 'includes/preview.php',
                    
67		'Responsive' => 'includes/responsive.php',
                    
                
colors_helper.php https://bitbucket.org/tmvg/order.tv-digital-service.de.git | PHP | 333 lines
                    
1<?php
                    
2/**
                    
19 *
                    
20 *	http://www.phpclasses.org/browse/package/3370.html
                    
21 *
                    
25	
                    
26	var $PREVIEW_WIDTH    = 150;
                    
27	var $PREVIEW_HEIGHT   = 150;
                    
37	{
                    
38		if (is_readable( $img ))
                    
39		{
                    
51			if ($size[0]>0)
                    
52			$scale = min($this->PREVIEW_WIDTH/$size[0], $this->PREVIEW_HEIGHT/$size[1]);
                    
53			if ($scale < 1)
                    
182			{
                    
183				// only works in PHP5
                    
184				// return array_slice( $hexarray, 0, $count, true );
                    
                
CMSBaseComponent.php https://github.com/phpwax/wildfire.git | PHP | 137 lines
                    
1<?php
                    
2/**
                    
4* Uses database to provide authentication
                    
5* @package PHP-WAX CMS
                    
6*/
                    
40  public $uploads = false;
                    
41  public $preview_hover = false;
                    
42  public $preview_click = false;
                    
129    foreach($partial_paths as $possible){
                    
130      if(($path = str_replace("%s%", $partial_name, $possible)) && is_readable($path)) return basename($path);
                    
131    }
                    
                
template.php https://repo.or.cz/dokuwiki/radio.git | PHP | 1415 lines
                    
1<?php
                    
2/**
                    
19
                    
20    if(@is_readable(DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$tpl))
                    
21        return DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$tpl;
                    
30 * (defined by the global $ACT var) by calling the appropriate
                    
31 * outputfunction(s) from html.php
                    
32 *
                    
62            break;
                    
63        case 'preview':
                    
64            html_edit($TEXT);
                    
266    $head['link'][] = array( 'rel'=>'search', 'type'=>'application/opensearchdescription+xml',
                    
267            'href'=>DOKU_BASE.'lib/exe/opensearch.php', 'title'=>$conf['title'] );
                    
268    $head['link'][] = array( 'rel'=>'start', 'href'=>DOKU_BASE );
                    
275        $head['link'][] = array( 'rel'=>'alternate', 'type'=>'application/rss+xml',
                    
276                'title'=>'Recent Changes', 'href'=>DOKU_BASE.'feed.php');
                    
277        $head['link'][] = array( 'rel'=>'alternate', 'type'=>'application/rss+xml',
                    
                
Attachment.class.php https://github.com/WoltLab/WCF.git | PHP | 364 lines
                    
1<?php
                    
2
                    
18 * @copyright   2001-2019 WoltLab GmbH
                    
19 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
                    
20 * @package WoltLabSuite\Core\Data\Attachment
                    
83    /**
                    
84     * Returns true if a user has the permission to view the preview of this
                    
85     * attachment.
                    
88     */
                    
89    public function canViewPreview()
                    
90    {
                    
90    {
                    
91        return $this->getPermission('canViewPreview');
                    
92    }
                    
94    /**
                    
95     * Returns true if a user has the permission to delete the preview of this
                    
96     * attachment.
                    
                
thumb.php https://gitlab.com/mahara2/ranginuis-mahara.git | PHP | 216 lines
                    
1<?php
                    
2/**
                    
15require('init.php');
                    
16require_once('file.php');
                    
17require_once('user.php');
                    
17require_once('user.php');
                    
18require_once('layoutpreviewimage.php');
                    
19
                    
43                        // We can use the email address for gravatar icon
                    
44                        $notfound = get_config('wwwroot').'thumb.php?type=profileiconbyid';
                    
45                        foreach ($_GET as $k => $v) {
                    
164        $path = $THEME->get_path('images/thumb.png', false, $basepath);
                    
165        if (is_readable($path)) {
                    
166            readfile_exit($path);
                    
168        $path = get_config('docroot') . $basepath . '/thumb.png';
                    
169        if (is_readable($path)) {
                    
170            readfile_exit($path);
                    
                
FileServe.php git://github.com/indeyets/appserver-in-php.git | PHP | 726 lines
                    
1<?php
                    
2
                    
46
                    
47        if (!is_readable($path))
                    
48            return array(403, array('Content-Type', 'text/plain'), 'Forbidden');
                    
120                'bmp' => 'image/bmp',
                    
121                'box' => 'application/vnd.previewsystems.box',
                    
122                'boz' => 'application/x-bzip2',
                    
                
bb-booster.php https://bitbucket.org/madiha303/clickitplugins-web.git | PHP | 144 lines
                    
1<?php
                    
2/**
                    
57
                    
58		foreach ( glob( FL_BUILDER_BOOSTER_DIR . 'classes/class-fl-builder-booster-*.php' ) as $path ) {
                    
59
                    
59
                    
60			if ( is_readable( $path ) ) {
                    
61
                    
67
                    
68		add_action( 'wp_ajax_bb_booster_post_previewed_is_editable', array( __CLASS__, 'post_previewed_is_editable' ) );
                    
69
                    
94	/**
                    
95	 * Check is the currently previewed post is editable
                    
96	 */
                    
96	 */
                    
97	public static function post_previewed_is_editable() {
                    
98
                    
                
Content.module.php https://github.com/PeterJCLaw/SquidgyCMS.git | PHP | 265 lines
                    
1<?php
                    
2#name = Content
                    
27		?>
                    
28			<input type="hidden" name="chunk_id" id="chunk_id" value="<?php echo $chunk_id; ?>" />
                    
29			<table><tr>
                    
30				<th><label for="chunk_title" title="The title of the chunk">Chunk Title:</label></th>
                    
31				<td><input  value="<?php echo $chunk_title; ?>" class="text" name="chunk_title" id="chunk_title" title="The title of the page" /></td>
                    
32			</tr><tr>
                    
32			</tr><tr>
                    
33				<?php $this->print_select_cells($chunks, $chunk_req); ?>
                    
34			</tr></table>
                    
34			</tr></table>
                    
35<?php
                    
36		$this->printTextarea($content, array('onkeydown' => 'monitor_changes(this.id);'));
                    
37		echo "\n	<fieldset style=\"display: none;\">";
                    
38		echo "\n		<legend>Live Preview</legend>";
                    
39		echo "\n		<div id=\"content-preview\">", Content::SquidgyParser($content), "</div>";
                    
                
scan.php https://repo.or.cz/anomen-overlay.git | PHP | 214 lines
                    
1<?php
                    
2  $lang_error=$lang[$lang_id][32];
                    
43  $width = $geometry_x;
                    
44  if (($width >= 0) && $width <= $PREVIEW_WIDTH_MM) {
                    
45    if($width <= $MAX_SCAN_WIDTH_MM) {
                    
58  $height = $geometry_y;
                    
59  if (($height >= 0) && $height <=$PREVIEW_HEIGHT_MM) {
                    
60      if($height <= $MAX_SCAN_HEIGHT_MM) {
                    
115    if ($action_preview) {
                    
116      $preview_images = $temp_dir."preview_".$sid.".jpg";
                    
117      $cmd_device = $SCANIMAGE." -d ".$scanner." --resolution ".$PREVIEW_DPI."dpi -l 0mm -t 0mm -x ".$MAX_SCAN_WIDTH_MM."mm -y ".$MAX_SCAN_HEIGHT_MM."mm".$cmd_mode.$cmd_brightness.$cmd_contrast.$cmd_usr_opt." | ".$PNMTOJPEG." --quality=50 > ".$preview_images;
                    
159        $file_path = $save_dir . $selected_file;
                    
160        if(is_readable($file_path)) {
                    
161          unlink($file_path);
                    
195    echo "<script language=\"JavaScript\" type=\"text/javascript\">\n";
                    
196    echo "window.open(\"./save.php?file_save=".$file_save."&file_save_image=".$file_save_image."&lang_id=".$lang_id."\",\"_blank\", \"width=400,height=500,left=320,top=200,scrollbars=yes,location=no,status=no,menubar=no\");\n";
                    
197    echo "</script>\n";
                    
                
class.geshistyler.php https://bitbucket.org/mayastudios_3rdparty/geshi | PHP | 640 lines
                    
1<?php
                    
2/**
                    
4 * <pre>
                    
5 *   File:   geshi/classes/class.geshicodecontext.php
                    
6 *   Author: Nigel McNie
                    
228            foreach ($this->themes as $theme) {
                    
229                $theme_file = GESHI_THEMES_ROOT . $theme . GESHI_DIR_SEP . $language . '.php';
                    
230                if (is_readable($theme_file)) {
                    
259            /** Get the GeSHiCodeParser class */
                    
260            require_once GESHI_CLASSES_ROOT . 'class.geshicodeparser.php';
                    
261            /** Get the default code parser class */
                    
261            /** Get the default code parser class */
                    
262            require_once GESHI_CLASSES_ROOT . 'class.geshidefaultcodeparser.php';
                    
263            $this->_codeParser = new GeSHiDefaultCodeParser($this, $this->language);
                    
269            /** Get the GeSHiRenderer class */
                    
270            require_once GESHI_CLASSES_ROOT . 'class.geshirenderer.php';
                    
271            /** Get the renderer class */
                    
                
autoloader.php https://bitbucket.org/krishana-choudhary/htdocs.git | PHP | 139 lines
                    
1<?php
                    
2namespace Elementor;
                    
10	private static $classes_map = [
                    
11		'Admin' => 'includes/admin.php',
                    
12		'Api' => 'includes/api.php',
                    
12		'Api' => 'includes/api.php',
                    
13		'Base_Control' => 'includes/controls/base.php',
                    
14		'Base_Data_Control' => 'includes/controls/base-data.php',
                    
14		'Base_Data_Control' => 'includes/controls/base-data.php',
                    
15		'Base_UI_Control' => 'includes/controls/base-ui.php',
                    
16		'Beta_Testers' => 'includes/beta-testers.php',
                    
16		'Beta_Testers' => 'includes/beta-testers.php',
                    
17		'Compatibility' => 'includes/compatibility.php',
                    
18		'Conditions' => 'includes/conditions.php',
                    
45		'Posts_CSS_Manager' => 'includes/managers/css-files.php',
                    
46		'Preview' => 'includes/preview.php',
                    
47		'Responsive' => 'includes/responsive.php',
                    
                
questionlib.php https://github.com/DeanLennard/Moodle-Question-Engine-2.git | PHP | 1800 lines
                    
1<?php
                    
2
                    
23 * This script also loads the questiontype classes
                    
24 * Code for handling the editing of questions is in {@link question/editlib.php}
                    
25 *
                    
35
                    
36require_once($CFG->dirroot . '/question/engine/lib.php');
                    
37require_once($CFG->dirroot . '/question/type/questiontype.php');
                    
80/**
                    
81 * The options used when popping up a question preview window in Javascript.
                    
82 */
                    
82 */
                    
83define('QUESTION_PREVIEW_POPUP_OPTIONS', 'scrollbars=yes,resizable=yes,width=800,height=600');
                    
84
                    
161    foreach (get_plugin_list('mod') as $module => $path) {
                    
162        $lib = $path . '/lib.php';
                    
163        if (is_readable($lib)) {
                    
                
VideoPreviewComponent.php https://github.com/xemle/phtagr.git | PHP | 269 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * PHP versions 5
                    
4 *
                    
17
                    
18class VideoPreviewComponent extends Component {
                    
19
                    
39
                    
40  private function _getDummyPreview() {
                    
41    return APP . 'webroot' . DS . 'img' . DS . 'dummy_video_preview.jpg';
                    
65
                    
66    if (count($found) && is_readable(Folder::addPathElement($path, $found[0]))) {
                    
67      $thumbFilename = Folder::addPathElement($path, $found[0]);
                    
95  /**
                    
96   * Creates a video preview image using ffmpeg
                    
97   *
                    
                
ml-slider.php https://gitlab.com/ughimire/ekabita.git | PHP | 1866 lines
                    
89            'metaflexslider'         => METASLIDER_PATH . 'inc/slider/metaslider.flex.class.php',

                    
90            'metanivoslider'         => METASLIDER_PATH . 'inc/slider/metaslider.nivo.class.php',

                    
91            'metaresponsiveslider'   => METASLIDER_PATH . 'inc/slider/metaslider.responsive.class.php',

                    
111

                    
112            // >= PHP 5.2 - Use auto loading

                    
113            if ( function_exists( "__autoload" ) ) {

                    
120

                    
121            // < PHP5.2 - Require all classes

                    
122            foreach ( $this->plugin_classes() as $id => $path ) {

                    
171

                    
172        add_action( 'admin_post_metaslider_preview', array( $this, 'do_preview' ) );

                    
173        add_action( 'admin_post_metaslider_hide_go_pro_page', array( $this, 'hide_go_pro_page' ) );

                    
333            <p><?php echo $gopro_link; ?></p>

                    
334            <p><?php echo $support_link; ?> <?php echo $documentation_link; ?></p>

                    
335            <p><em>Don't want to see this? <?php echo $hide_link; ?></em></p>

                    
                
colors.inc.php https://bitbucket.org/medicalmotion/backend.git | PHP | 336 lines
                    
1<?php
                    
2/**
                    
19 *
                    
20 *	http://www.phpclasses.org/browse/package/3370.html
                    
21 *
                    
28{
                    
29	var $PREVIEW_WIDTH    = 150;
                    
30	var $PREVIEW_HEIGHT   = 150;
                    
40	{
                    
41		if (is_readable( $img ))
                    
42		{
                    
54			if ($size[0]>0)
                    
55			$scale = min($this->PREVIEW_WIDTH/$size[0], $this->PREVIEW_HEIGHT/$size[1]);
                    
56			if ($scale < 1)
                    
185			{
                    
186				// only works in PHP5
                    
187				// return array_slice( $hexarray, 0, $count, true );
                    
                
ImportExportHelper.php https://bitbucket.org/btokman/unibot.git | PHP | 271 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Created by PhpStorm.
                    
4 * User: art
                    
69
                    
70            //check if Excel2003XML for PHPExcel
                    
71            $signature = [
                    
75
                    
76            //if wrong format for PHPExcel - add signature tag
                    
77            if (!$isExcelXml) {
                    
90    /**
                    
91     * fix excel data in preview, sometimes get something like this:
                    
92     * 69.6 (in excel cell) show as 69.59999999999999 (in preview) - don't know why
                    
95     */
                    
96    public static function fixExcelPreview($dataArray)
                    
97    {
                    
                
ConfigCompiler.php https://bitbucket.org/wi-labs/dbef.git | PHP | 484 lines
                    
77	static private function util_array_from_file_legacy_v2( $filename ) {
                    
78		if ( file_exists( $filename ) && is_readable( $filename ) ) {
                    
79			// including file directly instead of read+eval causes constant
                    
93
                    
94	public function __construct( $blog_id, $preview ) {
                    
95		$this->_blog_id = $blog_id;
                    
95		$this->_blog_id = $blog_id;
                    
96		$this->_preview = $preview;
                    
97
                    
150			$child_filename = Config::util_config_filename_legacy_v2(
                    
151				$this->_blog_id, $this->_preview );
                    
152			$data = self::util_array_from_file_legacy_v2( $child_filename );
                    
336			$file_data['extensions.active']['fragmentcache'] =
                    
337				'w3-total-cache/Extension_FragmentCache_Plugin.php';
                    
338
                    
                
wpjobads.php https://github.com/simpsonjulian/puppet-wordpress.git | PHP | 2646 lines
                    
88        <p><?php _e('Are you sure?') ?></p>
                    
89        <input type="submit" value="<?php echo attribute_escape(__('Yes')) ?>"> <a href="javascript:history.go(-1);"><?php _e('No') ?></a>
                    
90    </form>
                    
98{
                    
99    if (!$redirect) $redirect = 'wpjobads/wpjobads.php';
                    
100    $nonce_action = 'activate-license';
                    
211            if (wpjobads_valid_job($preview)) {
                    
212                $preview['title'] = sprintf(__('Preview: %s'), $preview['title']);
                    
213                $post->post_title = $preview['title'];
                    
213                $post->post_title = $preview['title'];
                    
214                $post->post_content = wpjobads_preview(wpjobads_extract_fields($_POST)) . apply_filters('the_content', wpjobads_view_job($preview)) . wpjobads_preview(wpjobads_extract_fields($_POST));
                    
215            } else {
                    
280        add_filter('wp_title', create_function('$title', "return \$title;"), 10);
                    
281        wpjobads_php4_fix();
                    
282        return;
                    
                
functions.php https://bitbucket.org/ssellek/saywhatnation.bitbucket.git | PHP | 373 lines
                    
1<?php
                    
2
                    
2
                    
3require_once (TEMPLATEPATH . '/includes/user-rating.php');
                    
4
                    
7$locale = get_locale();
                    
8$locale_file = TEMPLATEPATH . "/languages/$locale.php";
                    
9if (is_readable($locale_file))
                    
80// Link to seperated functions
                    
81require_once (TEMPLATEPATH . '/includes/widget_areas.php');
                    
82require_once (TEMPLATEPATH . '/includes/multiple_excerpts.php');
                    
82require_once (TEMPLATEPATH . '/includes/multiple_excerpts.php');
                    
83require_once (TEMPLATEPATH . '/includes/comments.php');
                    
84require_once (TEMPLATEPATH . '/includes/kreisi_pagination.php');
                    
84require_once (TEMPLATEPATH . '/includes/kreisi_pagination.php');
                    
85require_once (TEMPLATEPATH . '/includes/thumbnails.php');
                    
86require_once (TEMPLATEPATH . '/includes/menu-alterations.php');
                    
                
imagepro.php https://gitlab.com/vnsoftdev/amms.git | PHP | 307 lines
                    
1<?php
                    
2/**
                    
62	/*
                    
63		Function: getPreview
                    
64			Return file preview
                    
68	*/
                    
69	public function getPreview($file = null)
                    
70	{
                    
94		{
                    
95			if($layout = $this->getLayout('render/default/_sublayouts/'.$params->find('layout._sublayout', '_default.php'))){
                    
96				$result['result'][$key] = $this->renderLayout($layout, array('img' => $image, 'params' => $params));
                    
124		{
                    
125			if (is_file($sourcepath) && is_readable($sourcepath)){
                    
126				$result[] = $this->getImgObject($file2, $params, $width, $height, $ac);
                    
205	public function _edit(){
                    
206		if ($layout = $this->getLayout("edit/_edit.php")) {
                    
207			return $this->renderLayout($layout, array());
                    
                
ajax_get_file_list.php https://github.com/zengcode/ZengCode-PHP-Framework.git | PHP | 159 lines
                    
113								<tr class="<?php echo $css; ?>" id="row<?php echo $count; ?>"  >
                    
114									<td onclick="setDocInfo('<?php echo $file['type']; ?>', '<?php echo $count; ?>');"><input type="checkbox" name="check[]" id="check<?php echo $count; ?>" value="<?php echo $file['name']; ?>" <?php echo $strDisabled; ?> />
                    
115										<input type="hidden" name="fileName<?php echo $count; ?>" value="<?php echo $file['name']; ?>" id="fileName<?php echo $count; ?>" />
                    
121										<input type="hidden" name="fileWritable<?php echo $count; ?>" id="fileWritable<?php echo $count; ?>" value="<?php echo $file['is_writable']; ?>" />
                    
122										<input type="hidden" name="filePreview<?php echo $count; ?>" id="filePreview<?php echo $count; ?>" value="<?php echo $file['preview']; ?>" />
                    
123										<input type="hidden" name="filePath<?php echo $count; ?>" id="filePath<?php echo $count; ?>" value="<?php echo $file['path']; ?>" />
                    
126										</td>
                    
127									<td><a href="<?php echo $file['path']; ?>" target="_blank"><span class="<?php echo $file['cssClass']; ?>"><span id="flag<?php echo $count; ?>" class="<?php echo $file['flag']; ?>">&nbsp;</span></span></a></td>
                    
128									<td class="<?php echo $strClass; ?>"  id="<?php echo $file['path']; ?>"><?php echo $file['name']; ?></td>
                    
136									<tr class="<?php echo $css; ?>" id="row<?php echo $count; ?>" >
                    
137										<td onclick="setDocInfo('folder', '<?php echo $count; ?>');"><input type="checkbox" name="check[]" id="check<?php echo $count; ?>" value="<?php echo $file['name']; ?>" <?php echo $strDisabled; ?>/>
                    
138											<input type="hidden" name="folderName<?php echo $count; ?>" id="folderName<?php echo $count; ?>" value="<?php echo $file['name']; ?>" />
                    
147										</td>
                    
148										<td><a href="<?php echo appendQueryString(appendQueryString(URL_AJAX_FILE_MANAGER, "path=" . $file['path']), makeQueryString(array('path'))); ?>" title="<?php echo TIP_FOLDER_GO_DOWN; ?>"><span class="<?php echo ($file['file']||$file['subdir']?$file['cssClass']:"folderEmpty"); ?>"><span id="flag<?php echo $count; ?>" class="<?php echo $file['flag']; ?>">&nbsp;</span></span></a></td>
                    
149										<td class="<?php echo $strClass; ?>" id="<?php echo $file['path']; ?>"><?php echo $file['name']; ?></td>
                    
                
composer-setup.php https://gitlab.com/BlokNotWebapp/StockFiches | PHP | 5030 lines
                    
31    $quiet = in_array('--quiet', $argv);
                    
32    $channel = in_array('--snapshot', $argv) ? 'snapshot' : (in_array('--preview', $argv) ? 'preview' : 'stable');
                    
33    $disableTls = in_array('--disable-tls', $argv);
                    
79--install-dir="..."  accepts a target installation directory
                    
80--preview            install the latest version from the preview (alpha/beta/rc) channel instead of stable
                    
81--snapshot           install the latest version from the snapshot (dev builds) channel instead of stable
                    
218    if ($iniPath = php_ini_loaded_file()) {
                    
219        $iniMessage = PHP_EOL . 'The php.ini used by your command-line PHP is: ' . $iniPath;
                    
220    } else {
                    
302        $errors['php'] = array(
                    
303            'Your PHP (' . PHP_VERSION . ') is too old, you must upgrade to PHP 5.3.2 or higher.'
                    
304        );
                    
308        $warnings['php'] = array(
                    
309            'Your PHP (' . PHP_VERSION . ') is quite old, upgrading to PHP 5.3.4 or higher is recommended.',
                    
310            'Composer works with 5.3.2+ for most people, but there might be edge case issues.'
                    
                
exponent.php https://github.com/exponentcms/exponent-cms-1.git | PHP | 184 lines
                    
29// Bootstrap, which will clean the _POST, _GET and _REQUEST arrays, and include 
                    
30// necessary setup files (exponent_setup.php, exponent_variables.php) as well as initialize
                    
31// the compatibility layer.
                    
39// Initialize the AutoLoader Subsystem
                    
40require_once(BASE.'subsystems/autoloader.php');
                    
41
                    
42// Initialize the Sessions Subsystem
                    
43require_once(BASE.'subsystems/sessions.php');
                    
44// Initializes the session.  This will populate the $user variable
                    
107// Initialize the language subsystem
                    
108require_once(BASE.'subsystems/lang.php');
                    
109exponent_lang_initialize();
                    
131// Initialize the javascript subsystem
                    
132if (!defined('SYS_JAVASCRIPT')) require_once(BASE.'subsystems/javascript.php');
                    
133
                    
                
PreviewManagerComponent.php https://github.com/xemle/phtagr.git | PHP | 137 lines
                    
2/**
                    
3 * PHP versions 5
                    
4 *
                    
23  /**
                    
24   * Defauls for a preview configuration
                    
25   */
                    
38  /**
                    
39   * Different preview configurations
                    
40   */
                    
49    'preview' => array(
                    
50      'size' => OUTPUT_SIZE_PREVIEW,
                    
51      'requires' => 'high'),
                    
79      $this->controller->loadComponent('VideoPreview', $this);
                    
80      return $this->VideoPreview->getPreviewFilename($media);
                    
81    }
                    
                
administrationController.php https://github.com/krazykelv/exponent-cms.git | PHP | 1360 lines
                    
1<?php
                    
2
                    
67		$coredefs = BASE.'framework/core/definitions';
                    
68		if (is_readable($coredefs)) {
                    
69			$dh = opendir($coredefs);
                    
70			while (($file = readdir($dh)) !== false) {
                    
71				if (is_readable("$coredefs/$file") && is_file("$coredefs/$file") && substr($file,-4,4) == ".php" && substr($file,-9,9) != ".info.php") {
                    
72					$used_tables[]= strtolower(substr($file,0,-4));
                    
90                            while (($def = readdir($def_dir)) !== false) {
                    
91                                if (is_readable("$dirpath/$def") && is_file("$dirpath/$def") && substr($def,-4,4) == ".php" && substr($def,-9,9) != ".info.php") {
                    
92                                    if ((!in_array(substr($def,0,-4), $used_tables))) {
                    
270			    while (($file = readdir($dh)) !== false) {
                    
271				    if (substr($file,-4,4) == '.php' && is_readable($dir.'/'.$file) && is_file($dir.'/'.$file)) {
                    
272					    $menu[substr($file,0,-4)] = include($dir.'/'.$file);
                    
405		}
                    
406		$message = ($level == UILEVEL_PREVIEW) ? gt("Exponent is no longer in 'Preview' mode") : gt("Exponent is now in 'Preview' mode") ;
                    
407		flash('message',$message);
                    
                
class.IMagickPreviewer.php https://gitlab.com/KasaiDot/pydio-core | PHP | 382 lines
                    
1<?php
                    
2/*
                    
24/**
                    
25 * Encapsulates calls to Image Magick to extract JPG previews of PDF, PSD, TIFF, etc.
                    
26 * @package AjaXplorer_Plugins
                    
28 */
                    
29class IMagickPreviewer extends AJXP_Plugin
                    
30{
                    
65            $file = $selection->getUniqueNode()->getUrl();
                    
66            if(!file_exists($file) || !is_readable($file)){
                    
67                throw new Exception("Cannot find file");
                    
69            if(isSet($httpVars["all"])) {
                    
70                $this->logInfo('Preview', 'Preview content of '.$file, array("files" => $file));
                    
71                $this->extractAll = true;
                    
98                $prefix = str_replace(".$ext", "", $cache->getId());
                    
99                $files = $this->listPreviewFiles($file, $prefix);
                    
100                header("Content-Type: application/json");
                    
                
 

Source

Language