100+ results for 'php chmod'
Not the results you expected?
Pagefile.php (https://github.com/Cahya/P21.git) PHP · 284 lines
1 <?php
3 /**
87 $destination = $this->pagefiles->path() . $basename;
88 if(!@copy($filename, $destination)) throw new WireException("Unable to copy: $filename => $destination");
89 if($this->config->chmodFile) chmod($this->pagefiles->path() . $basename, octdec($this->config->chmodFile));
90 parent::set('basename', $basename);
275 public function copyToPath($path) {
276 $result = copy($this->filename, $path . $this->basename());
277 if($this->config->chmodFile) chmod($path . $this->basename(), octdec($this->config->chmodFile));
278 return $result;
279 }
Result.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 208 lines
1 <?php
2 namespace MailPoetVendor\Doctrine\DBAL\ForwardCompatibility;
3 if (!defined('ABSPATH')) exit;
41 return $this->stmt->columnCount();
42 }
43 public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null)
44 {
45 return $this->stmt->setFetchMode($fetchMode, $arg2, $arg3);
46 }
47 public function fetch($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0)
48 {
49 Deprecation::triggerIfCalledFromOutside('doctrine/dbal', 'https://github.com/doctrine/dbal/pull/4019', 'Result::fetch() is deprecated, use Result::fetchNumeric(), fetchAssociative() or fetchOne() instead.');
50 return $this->stmt->fetch(...func_get_args());
51 }
52 public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
53 {
54 Deprecation::triggerIfCalledFromOutside('doctrine/dbal', 'https://github.com/doctrine/dbal/pull/4019', 'Result::fetchAll() is deprecated, use Result::fetchAllNumeric(), fetchAllAssociative() or ' . 'fetchFirstColumn() instead.');
Config.php (https://bitbucket.org/webpolis/liiv.git) PHP · 514 lines
156 * @access private
157 */
158 var $_chmodFolders = 0755;
159 /**
160 * Hide folders
336 function getChmodFiles()
337 {
338 return $this->_chmodFiles;
339 }
479 if (isset($GLOBALS['config']['ChmodFiles'])) {
480 $this->_chmodFiles = $GLOBALS['config']['ChmodFiles'];
481 }
482 if (isset($GLOBALS['config']['ChmodFolders'])) {
483 $this->_chmodFolders = $GLOBALS['config']['ChmodFolders'];
484 }
485 if (isset($GLOBALS['config']['DefaultResourceTypes'])) {
Accounts.php (https://github.com/srsree/OurBank.git) PHP · 355 lines
1 <?php
2 /*
3 ############################################################################
20 ?>
22 <?php
23 class Loanaccount_Model_Accounts extends Zend_Db_Table {
24 protected $_name = 'ourbank_accounts';
46 {
47 $this->db = Zend_Db_Table::getDefaultAdapter();
48 $this->db->setFetchMode(Zend_Db::FETCH_OBJ);
49 $sql= "SELECT
50 a.id as id,
85 {
86 $db = Zend_Db_Table::getDefaultAdapter();
87 $db->setFetchMode(Zend_Db::FETCH_OBJ);
88 $sql="SELECT
89 a.id as id,
reader.php (https://bitbucket.org/crevillo/enetcall.git) PHP · 279 lines
1 <?php
2 /**
3 * File containing the ezcDbSchemaMysqlReader class.
11 /**
12 * Handler for files containing PHP arrays that represent DB schema.
13 *
14 * @package DatabaseSchema
89 $resultArray = $this->db->query( "DESCRIBE `$tableName`" );
90 $resultArray->setFetchMode( PDO::FETCH_ASSOC );
92 foreach ( $resultArray as $row )
Admin.php (https://gitlab.com/sdlion/project_the_beginner_b35) PHP · 234 lines
100 $STH = $this->conn->query('SELECT * from doctor');
102 $fetchMode = strtoupper($fetchMode);
103 if(substr_count($fetchMode,'OBJ') > 0)
104 $STH->setFetchMode(PDO::FETCH_OBJ);
105 else
106 $STH->setFetchMode(PDO::FETCH_ASSOC);
117 $STH = $this->conn->query('SELECT * from doctor where id='.$this->id);
119 $fetchMode = strtoupper($fetchMode);
120 if(substr_count($fetchMode,'OBJ') > 0)
121 $STH->setFetchMode(PDO::FETCH_OBJ);
122 else
123 $STH->setFetchMode(PDO::FETCH_ASSOC);
files.php (https://gitlab.com/webbroteam/satisfaction-mvc) PHP · 306 lines
1 <?php
2 /**
3 *
17 use phpFastCache\Core\DriverAbstract;
18 use phpFastCache\Exceptions\phpFastCacheDriverException;
20 /**
37 if (!$this->checkdriver() && !isset($config[ 'skipError' ])) {
38 throw new phpFastCacheDriverException("Can't use this driver for your website!");
39 }
40 }
73 if (!mkdir($path, $this->__setChmodAuto())) {
74 throw new phpFastCacheDriverException('PLEASE CHMOD ' . $this->getPath() . ' - 0777 OR ANY WRITABLE PERMISSION!', 92);
75 }
76 }
Tag.php (https://github.com/michaelmcandrew/vaw.git) PHP · 215 lines
1 <?php
3 /*
56 */
57 static function buildQuickForm( &$form, $parentNames, $entityTable, $entityId = null, $skipTagCreate = false,
58 $skipEntityAction = false, $searchMode = false ) {
59 $tagset = $form->_entityTagValues = array( );
60 $mode = null;
74 $qparams = "parentId={$parentId}";
76 if ( $searchMode ) {
77 $qparams .= '&search=1';
78 }
106 if ( $entityId ) {
107 $tagset[$tagsetItem]['entityId'] = $entityId;
108 require_once 'CRM/Core/BAO/EntityTag.php';
109 $entityTags = CRM_Core_BAO_EntityTag::getChildEntityTags( $parentId, $entityId, $entityTable );
110 } else {
file2.kvdriver.php (git://github.com/jelix/jelix.git) PHP · 292 lines
test.php (https://github.com/F5/zetacomponents.git) PHP · 297 lines
Config.php (https://github.com/justinmc/turkiball.com.git) PHP · 514 lines
156 * @access private
157 */
158 private $_chmodFolders = 0755;
159 /**
160 * Hide folders
336 public function getChmodFiles()
337 {
338 return $this->_chmodFiles;
339 }
479 if (isset($GLOBALS['config']['ChmodFiles'])) {
480 $this->_chmodFiles = $GLOBALS['config']['ChmodFiles'];
481 }
482 if (isset($GLOBALS['config']['ChmodFolders'])) {
483 $this->_chmodFolders = $GLOBALS['config']['ChmodFolders'];
484 }
485 if (isset($GLOBALS['config']['DefaultResourceTypes'])) {
ArchiveModule.java (https://github.com/jehc/MondocosmOS.git) Java · 205 lines
10 * License, Version 2 (the "License"); you may not use this file
11 * except in compliance with the License. A copy of the License is
12 * available at http://www.opensource.org/licenses/gpl-license.php.
13 *
14 * Sun designates this particular file as subject to the "Classpath"
63 * Fetch the module info, this is pretty bad if module.xml doesn't exist
64 */
65 ModuleInfo info = this.fetchModuleInfo();
66 if (info == null) {
67 info = new ModuleInfo();
72 * Fetch the module dependencies, this isn't terrible if it doesn't exist
73 */
74 ModuleRequires requires = this.fetchModuleRequires();
75 if (requires == null) {
76 requires = new ModuleRequires();
DbStatement.php (https://github.com/grandison/budo16.git) PHP · 381 lines
1 <?php
2 /**
3 * Zend Framework
15 * @category Zend
16 * @package Test
17 * @subpackage PHPUnit
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: DbStatement.php 16911 2009-07-21 11:54:03Z matthew $
21 */
23 // require_once "Zend/Db/Statement/Interface.php";
25 /**
transport.core.accesspolicies.php (https://github.com/hatone/revolution.git) PHP · 120 lines
1 <?php
2 /**
3 * Default MODX Access Policies
26 'parent' => 0,
27 'class' => '',
28 'data' => '{"about":true,"access_permissions":true,"actions":true,"change_password":true,"change_profile":true,"charsets":true,"class_map":true,"components":true,"content_types":true,"countries":true,"create":true,"credits":true,"customize_forms":true,"dashboards":true,"database":true,"database_truncate":true,"delete_category":true,"delete_chunk":true,"delete_context":true,"delete_document":true,"delete_eventlog":true,"delete_plugin":true,"delete_propertyset":true,"delete_role":true,"delete_snippet":true,"delete_template":true,"delete_tv":true,"delete_user":true,"directory_chmod":true,"directory_create":true,"directory_list":true,"directory_remove":true,"directory_update":true,"edit_category":true,"edit_chunk":true,"edit_context":true,"edit_document":true,"edit_locked":true,"edit_plugin":true,"edit_propertyset":true,"edit_role":true,"edit_snippet":true,"edit_template":true,"edit_tv":true,"edit_user":true,"element_tree":true,"empty_cache":true,"error_log_erase":true,"error_log_view":true,"export_static":true,"file_create":true,"file_list":true,"file_manager":true,"file_remove":true,"file_tree":true,"file_update":true,"file_upload":true,"file_view":true,"flush_sessions":true,"frames":true,"help":true,"home":true,"import_static":true,"languages":true,"lexicons":true,"list":true,"load":true,"logout":true,"logs":true,"menus":true,"menu_reports":true,"menu_security":true,"menu_site":true,"menu_support":true,"menu_system":true,"menu_tools":true,"menu_user":true,"messages":true,"namespaces":true,"new_category":true,"new_chunk":true,"new_context":true,"new_document":true,"new_document_in_root":true,"new_plugin":true,"new_propertyset":true,"new_role":true,"new_snippet":true,"new_static_resource":true,"new_symlink":true,"new_template":true,"new_tv":true,"new_user":true,"new_weblink":true,"packages":true,"policy_delete":true,"policy_edit":true,"policy_new":true,"policy_save":true,"policy_template_delete":true,"policy_template_edit":true,"policy_template_new":true,"policy_template_save":true,"policy_template_view":true,"policy_view":true,"property_sets":true,"providers":true,"publish_document":true,"purge_deleted":true,"remove":true,"remove_locks":true,"resourcegroup_delete":true,"resourcegroup_edit":true,"resourcegroup_new":true,"resourcegroup_resource_edit":true,"resourcegroup_resource_list":true,"resourcegroup_save":true,"resourcegroup_view":true,"resource_quick_create":true,"resource_quick_update":true,"resource_tree":true,"save":true,"save_category":true,"save_chunk":true,"save_context":true,"save_document":true,"save_plugin":true,"save_propertyset":true,"save_role":true,"save_snippet":true,"save_template":true,"save_tv":true,"save_user":true,"search":true,"settings":true,"sources":true,"source_delete":true,"source_edit":true,"source_save":true,"source_view":true,"steal_locks":true,"tree_show_element_ids":true,"tree_show_resource_ids":true,"undelete_document":true,"unlock_element_properties":true,"unpublish_document":true,"usergroup_delete":true,"usergroup_edit":true,"usergroup_new":true,"usergroup_save":true,"usergroup_user_edit":true,"usergroup_user_list":true,"usergroup_view":true,"view":true,"view_category":true,"view_chunk":true,"view_context":true,"view_document":true,"view_element":true,"view_eventlog":true,"view_offline":true,"view_plugin":true,"view_propertyset":true,"view_role":true,"view_snippet":true,"view_sysinfo":true,"view_template":true,"view_tv":true,"view_unpublished":true,"view_user":true,"workspaces":true}',
29 'lexicon' => 'permissions',
30 ), '', true, true);
114 'parent' => 0,
115 'class' => '',
116 'data' => '{"about":true,"change_password":true,"change_profile":true,"charsets":true,"class_map":true,"components":true,"content_types":true,"countries":true,"create":true,"credits":true,"customize_forms":true,"dashboards":true,"database":true,"delete_category":true,"delete_chunk":true,"delete_context":true,"delete_document":true,"delete_eventlog":true,"delete_plugin":true,"delete_propertyset":true,"delete_snippet":true,"delete_template":true,"delete_tv":true,"delete_role":true,"delete_user":true,"directory_chmod":true,"directory_create":true,"directory_list":true,"directory_remove":true,"directory_update":true,"edit_category":true,"edit_chunk":true,"edit_context":true,"edit_document":true,"edit_locked":true,"edit_plugin":true,"edit_propertyset":true,"edit_role":true,"edit_snippet":true,"edit_template":true,"edit_tv":true,"edit_user":true,"element_tree":true,"empty_cache":true,"error_log_erase":true,"error_log_view":true,"export_static":true,"file_create":true,"file_list":true,"file_manager":true,"file_remove":true,"file_tree":true,"file_update":true,"file_upload":true,"file_view":true,"frames":true,"help":true,"home":true,"import_static":true,"languages":true,"lexicons":true,"list":true,"load":true,"logout":true,"logs":true,"menu_reports":true,"menu_site":true,"menu_support":true,"menu_system":true,"menu_tools":true,"menu_user":true,"menus":true,"messages":true,"namespaces":true,"new_category":true,"new_chunk":true,"new_context":true,"new_document":true,"new_static_resource":true,"new_symlink":true,"new_weblink":true,"new_document_in_root":true,"new_plugin":true,"new_propertyset":true,"new_role":true,"new_snippet":true,"new_template":true,"new_tv":true,"new_user":true,"packages":true,"property_sets":true,"providers":true,"publish_document":true,"purge_deleted":true,"remove":true,"resource_quick_create":true,"resource_quick_update":true,"resource_tree":true,"save":true,"save_category":true,"save_chunk":true,"save_context":true,"save_document":true,"save_plugin":true,"save_propertyset":true,"save_snippet":true,"save_template":true,"save_tv":true,"save_user":true,"search":true,"settings":true,"source_delete":true,"source_edit":true,"source_save":true,"source_view":true,"sources":true,"tree_show_element_ids":true,"tree_show_resource_ids":true,"undelete_document":true,"unpublish_document":true,"unlock_element_properties":true,"view":true,"view_category":true,"view_chunk":true,"view_context":true,"view_document":true,"view_element":true,"view_eventlog":true,"view_offline":true,"view_plugin":true,"view_propertyset":true,"view_role":true,"view_snippet":true,"view_sysinfo":true,"view_template":true,"view_tv":true,"view_user":true,"view_unpublished":true,"workspaces":true}',
117 'lexicon' => 'permissions',
118 ), '', true, true);
controller.php (https://github.com/xiongchuan86/openadm-yii2.git) PHP · 205 lines
13 $controllerClass = StringHelper::basename($generator->controllerClass);
14 $modelClass = StringHelper::basename($generator->modelClass);
15 $searchModelClass = StringHelper::basename($generator->searchModelClass);
16 if ($modelClass === $searchModelClass) {
34 <?php if (!empty($generator->searchModelClass)): ?>
35 use <?= ltrim($generator->searchModelClass, '\\') . (isset($searchModelAlias) ? " as $searchModelAlias" : "") ?>;
36 <?php else: ?>
69 <?php if (!empty($generator->searchModelClass)): ?>
70 $searchModel = new <?= isset($searchModelAlias) ? $searchModelAlias : $searchModelClass ?>();
71 $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
73 return $this->render('index', [
74 'searchModel' => $searchModel,
75 'dataProvider' => $dataProvider,
76 ]);
path.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 308 lines
1 <?php
2 /**
3 * @package Joomla.Platform
34 * @since 11.1
35 */
36 public static function canChmod($path)
37 {
38 $perms = fileperms($path);
39 if ($perms !== false)
40 {
41 if (@chmod($path, $perms ^ 0001))
42 {
43 @chmod($path, $perms);
51 /**
52 * Chmods files and directories recursively to given permissions.
53 *
54 * @param string $path Root path to begin changing mode [without trailing slash].
Pdo.php (https://github.com/coder-int21h/noses.git) PHP · 433 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Mysqli.php 4874 2007-05-19 01:26:32Z bkarwin $
21 */
24 * @see Zend_Db_Statement
25 */
26 require_once 'Zend/Db/Statement.php';
28 /**
51 * @var int
52 */
53 protected $_fetchMode = PDO::FETCH_ASSOC;
55 /**
ArrayHydrator.php (https://github.com/jaikdean/doctrine2.git) PHP · 280 lines
1 <?php
3 declare(strict_types=1);
5 namespace Doctrine\ORM\Internal\Hydration;
7 use Doctrine\DBAL\FetchMode;
8 use Doctrine\ORM\Mapping\ToOneAssociationMetadata;
9 use function count;
61 $result = [];
63 while ($data = $this->stmt->fetch(FetchMode::ASSOCIATIVE)) {
64 $this->hydrateRowData($data, $result);
65 }
PolicyConditions.cs (https://github.com/aliyun/aliyun-oss-csharp-sdk.git) C# · 300 lines
54 {
55 public string Name { get; set; }
56 public MatchMode MatchMode { get; set; }
57 public TupleType TupleType { get; set; }
59 protected AbstractConditionItem(string name, MatchMode matchMode, TupleType tupleType)
60 {
61 Name = name;
216 /// <param name="name">Condition name</param>
217 /// <param name="value">Condition value</param>
218 public void AddConditionItem(MatchMode matchMode, string name, string value)
219 {
220 MatchRuleChecker.Check(matchMode, name);
268 static MatchRuleChecker()
269 {
270 var ordinaryMatchModes = new List<MatchMode> {MatchMode.Exact, MatchMode.StartWith};
271 var specialMatchModes = new List<MatchMode> {MatchMode.Range};
DirectFilesystem.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 500 lines
95 if ( !$recursive || !$this->isDir( $file ) ) {
96 wfSuppressWarnings();
97 $result = (bool)chmod( $file, $mode );
98 wfRestoreWarnings();
99 return $result;
228 * @see Filesystem::getChmod
229 */
230 public function getChmod( $file ) {
231 wfSuppressWarnings();
232 $fileperms = fileperms( $file );
434 if ( !$chmod ) {
435 $chmod = FS_CHMOD_DIR;
436 }
444 }
446 $this->chmod( $path, $chmod );
448 if ( $chown ) {
syscalls.c (https://github.com/Kochise/dreamcast-docs.git) C · 382 lines
customize-your-store.js (https://gitlab.com/axeltizon/magento-demopoweraccess) JavaScript · 194 lines
32 if (!$localStorage.store) {
33 $http.get('index.php/customize-your-store/default-time-zone',{'responseType' : 'json'})
34 .success(function (data) {
35 $scope.store.timezone = data.defaultTimeZone;
48 $localStorage.store = $scope.store;
49 $scope.loading = true;
50 $http.post('index.php/modules/all-modules-valid', $scope.store)
51 .success(function (data) {
52 $scope.checkModuleConstraints.result = data;
63 if (!$scope.store.loadedAllModules) {
64 $http.get('index.php/modules').success(function (data) {
65 $state.loadedModules = data;
66 $scope.store.showModulesControl = true;
admin.php (https://bitbucket.org/adatux_/uakami.git) PHP · 164 lines
1 <?php
2 // Direct calls to this file are Forbidden when core files are not present
3 if (!function_exists ('add_action')) {
25 if( !is_dir (WP_CONTENT_DIR . '/bps-backup')) {
26 @mkdir (WP_CONTENT_DIR . '/bps-backup/master-backups', 0755, true);
27 @chmod (WP_CONTENT_DIR . '/bps-backup/', 0755);
28 @chmod (WP_CONTENT_DIR . '/bps-backup/master-backups/', 0755);
40 if( !is_dir (WP_CONTENT_DIR . '/bps-backup/logs')) {
41 @mkdir (WP_CONTENT_DIR . '/bps-backup/logs', 0755, true);
42 @chmod (WP_CONTENT_DIR . '/bps-backup/logs/', 0755);
43 }
64 add_menu_page(__('BulletProof Security ~ htaccess Core', 'bulletproof-security'), __('BPS Security', 'bulletproof-security'), 'manage_options', 'bulletproof-security/admin/options.php', '', plugins_url('bulletproof-security/admin/images/bps-icon-small.png'));
65 add_submenu_page('bulletproof-security/admin/options.php', __('BulletProof Security ~ htaccess Core', 'bulletproof-security'), __('BPS Settings', 'bulletproof-security'), 'manage_options', 'bulletproof-security/admin/options.php' );
66 }}
SummaryofOrganization.php (https://gitlab.com/Shweta_riya/Atomicproject_Riya_145741_b35) PHP · 265 lines
56 $STH = $this->DBH->query($sql);
58 $fetchMode = strtoupper($fetchMode);
59 if(substr_count($fetchMode,'OBJ') > 0)
75 $fetchMode = strtoupper($fetchMode);
76 if(substr_count($fetchMode,'OBJ') > 0)
101 $STH=$this->DBH->prepare($sql);
102 $STH->execute();
103 Utility::redirect('index.php');
105 }//end of delete();
122 $STH = $this->DBH->query($sql);
124 $fetchMode = strtoupper($fetchMode);
125 if(substr_count($fetchMode,'OBJ') > 0)
bypath.c (https://github.com/cytle/wechat_web_devtools.git) C · 362 lines
255 new_entry.mode = GIT_FILEMODE_BLOB_EXECUTABLE;
257 cl_must_pass(p_chmod("submod2/README.txt", GIT_FILEMODE_BLOB_EXECUTABLE));
259 cl_git_pass(git_index_add(g_idx, &new_entry));
281 new_entry.mode = GIT_FILEMODE_BLOB_EXECUTABLE;
283 cl_must_pass(p_chmod("submod2/README.txt", GIT_FILEMODE_BLOB_EXECUTABLE));
285 cl_git_pass(git_index_remove_bypath(g_idx, "README.txt"));
313 new_entry.mode = GIT_FILEMODE_BLOB_EXECUTABLE;
315 cl_must_pass(p_chmod("submod2/README.txt", GIT_FILEMODE_BLOB_EXECUTABLE));
317 cl_git_pass(git_index_remove_bypath(g_idx, "README.txt"));
mc_file_api.php (https://github.com/fusenigk/mantisbt-1.git) PHP · 222 lines
Attributes.php (https://github.com/imr/horde.git) PHP · 303 lines
1 <?php
2 /**
3 * This class provides attributes methods for any existing SQL class.
68 Horde::log('SQL Query by Hylax_SQL_Attributes::getAttributes(): ' . $query, 'DEBUG');
69 $rows = $this->_db->getAll($query, DB_FETCHMODE_ASSOC);
70 if (is_a($rows, 'PEAR_Error')) {
71 return $rows;
89 (int)$id);
90 Horde::log('SQL Query by Hylax_SQL_Attributes::getAttributes(): ' . $query, 'DEBUG');
91 return $this->_db->getAll($query, DB_FETCHMODE_ASSOC);
92 }
93 }
sfDebugConnection.php (https://github.com/richhl/kalturaCE.git) PHP · 294 lines
1 <?php
3 /**
77 public function connect($dsninfo, $flags = 0)
78 {
79 if (!($driver = Creole::getDriver($dsninfo['phptype'])))
80 {
81 throw new SQLException("No driver has been registered to handle connection type: $type");
153 * @see Connection::executeQuery()
154 */
155 public function executeQuery($sql, $fetchmode = null)
156 {
157 $this->lastExecutedQuery = $sql;
165 }
167 $retval = $this->childConnection->executeQuery($sql, $fetchmode);
169 if (sfConfig::get('sf_debug') && sfConfig::get('sf_logging_enabled'))
dirtool.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 195 lines
1 <?php
3 /* Do not remove or alter this section***************************
15 *********************Contact and Bug report***********************
16 contact me using the "contact-button" at one of my packages at phpclasses.org
18 ********************Licence****************************************
64 $this->copy($newLocation,$perm); // :-)
65 $this->delete();
66 chmod($newLocation,$perm);
67 }
86 if ($this->debug == TRUE)
87 echo "<br>Directory <b>$path</b> created";
88 chmod($path,$mode);
89 // at the first loop of recursiv callings keep the "$from-path
90 //if ($from == "")
Iterator.php (https://github.com/tdellenbach/koellners.git) PHP · 259 lines
1 <?php
2 // +----------------------------------------------------------------------+
3 // | PHP version 5 |
8 // +----------------------------------------------------------------------+
9 // | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
10 // | API as well as database abstraction for PHP applications. |
11 // | This LICENSE is in the BSD license style. |
12 // | |
63 * Constructor
64 */
65 public function __construct($result, $fetchmode = MDB2_FETCHMODE_DEFAULT)
66 {
67 $this->result = $result;
68 $this->fetchmode = $fetchmode;
69 }
70 // }}}
FileSystem.php (https://github.com/kiranatama/sagalaya.git) PHP · 268 lines
Serializer.php (https://github.com/nigeldaley/moodle.git) PHP · 191 lines
167 // we can chmod it ourselves
168 $chmod = $chmod | 0700;
169 if (chmod($dir, $chmod)) return true;
170 } elseif (filegroup($dir) === posix_getgid()) {
171 $chmod = $chmod | 0070;
172 } else {
173 // PHP's probably running as nobody, so we'll
174 // need to give global permissions
175 $chmod = $chmod | 0777;
176 }
177 trigger_error('Directory '.$dir.' not writable, '.
178 'please chmod to ' . decoct($chmod),
179 E_USER_WARNING);
180 } else {
extractpseudo.c (https://bitbucket.org/hlew/college-code.git) C · 253 lines
ftp.rst (https://github.com/dchill42/CodeIgniter.git) ReStructuredText · 249 lines
109 If you prefer you can store your FTP preferences in a config file.
110 Simply create a new file called the ftp.php, add the $config array in
111 that file. Then save the file at config/ftp.php and it will be used
152 Returns FALSE if the download does not execute successfully (including
153 if PHP does not have permission to write the local file)
155 $this->ftp->rename()
227 the folder name you wish to create, with a trailing slash. Permissions
228 can be set by passed an octal value in the second parameter (if you are
229 running PHP 5).
231 ::
234 $this->ftp->mkdir('/public_html/foo/bar/', DIR_WRITE_MODE);
236 $this->ftp->chmod()
237 ===================
Adapter.php (https://gitlab.com/habracoder/advertising) PHP · 461 lines
1 <?php
3 namespace Phalcon\Db {
69 *
70 * @param string $sqlQuery
71 * @param int $fetchMode
72 * @param array $bindParams
73 * @param array $bindTypes
74 * @return array
75 */
76 public function fetchOne($sqlQuery, $fetchMode=null, $bindParams=null, $bindTypes=null){ }
95 *
96 * @param string $sqlQuery
97 * @param int $fetchMode
98 * @param array $bindParams
99 * @param array $bindTypes
class.SSHTransport.php (https://github.com/kennethjiang/Wolke.git) PHP · 248 lines
helper.php (https://github.com/katalystsol/joomla-platform.git) PHP · 289 lines
31 * @return mixed
32 *
33 * @see http://www.php.net/manual/en/function.filesize.php#71098
34 * @since 11.1
35 */
126 * @return mixed
127 *
128 * @see http://www.php.net/manual/en/function.ftp-chmod.php
129 * @since 11.1
130 */
131 function ftpChmod($url, $mode)
132 {
133 $sch = parse_url($url, PHP_URL_SCHEME);
FileManager.php (https://bitbucket.org/seyar/kinda.local.git) PHP · 177 lines
DataTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 222 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
13 use Magento\CustomerImportExport\Model\Import\CustomerComposite;
15 class DataTest extends \PHPUnit_Framework_TestCase
16 {
17 /**
34 $statementMock = $this->getMock(
35 'Magento\Framework\DB\Statement\Pdo\Mysql',
36 ['setFetchMode', 'getIterator'],
37 [],
38 '',
131 *
132 * @return array
133 * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
134 */
135 public function getNextBunchDataProvider()
Installer.class.php (https://github.com/KomHunter2/WCF.git) PHP · 189 lines
1 <?php
2 namespace wcf\system\setup;
3 use wcf\system\exception\SystemException;
11 * @author Marcel Werk
12 * @copyright 2001-2011 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
14 * @package com.woltlab.wcf
15 * @subpackage system.setup
181 */
182 protected function makeWriteable($target) {
183 if (!preg_match('/^WIN/i', PHP_OS)) {
184 if (!@chmod($target, 0777)) {
185 //throw new SystemException("Could not chmod file '".$target."'");
186 }
187 }
inc.listado-curriculums.php (https://bitbucket.org/elulice/gestionar.git) PHP · 140 lines
82 <table width="90" border="0" cellspacing="0" cellpadding="0">
83 <tr>
84 <td width="30"><a href="javascript:verPostulante(<?php print($aRegistro["PerNro"]); ?>)"><img src="images/btn-ver-mas-<?php print($sPosicion); ?>.jpg" alt="Vista Rapida" width="24" height="23" border="0"></a></td>
85 <td width="30"><a href="ver-postulante.php?idregistro=<?php print($aRegistro["PerNro"]); ?>" target="_blank"><img src="images/btn-informe-<?php print($sPosicion); ?>.jpg" alt="Vista Completa" width="24" height="23" border="0"></a></td>
86 <td width="30"><a href="am-curriculums-notas.php?idregistro=<?php print($aRegistro["PerNro"]); ?>&idpostulante=<?php print($aRegistro["PerNro"]); ?>&url=<?php print($m_sURL); ?>"><img src="images/btn-ver-mas.png" alt="Ver Notas sobre el Postulante" width="23" height="23" border="0"></a></td>
87 <td><a href="listado-curriculums-asignar.php?idpostulante=<?php print ($aRegistro["PerNro"]); ?>"><img src="images/btn-adjuntar.png" alt="Asignar a una Oferta" width="23" height="23" border="0"></a></td>
95 <td width="140" class="listado-texto"><?php print($aRegistro["PerLocalidad"]); ?></td>
96 <td width="90" class="listado-texto"><?php print date("d/m/y", strtotime($aRegistro["PerFechModific"])); ?></td>
98 <td width="70">
99 <table width="70" border="0" cellspacing="0" cellpadding="0">
100 <tr>
101 <td width="30"><a href="am-curriculums.php?idregistro=<?php print($aRegistro["PerNro"]); ?>&idpostulante=<?php print($aRegistro["PerNro"]); ?>&url=<?php print($m_sURL); ?>"><img src="images/btn-modificar-<?php print($sPosicion); ?>.jpg" alt="Editar" width="24" height="23" border="0"></a></td>
102 <td><a href="abm.php?tabla=persona&columna=PerNro&idregistro=<?php print($aRegistro["idpostulante"]); ?>&url=<?php print($m_sURL); ?>" onclick="return confirm('¿Desea eliminar este Postulante?')"><img src="images/btn-eliminar-<?php print($sPosicion); ?>.jpg" alt="Eliminar" width="24" height="23" border="0"></a></td>
file_copy_recursive_test.php (https://gitlab.com/quyse/crashfix) PHP · 251 lines
1 <?php
2 /**
3 * @copyright Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
42 file_put_contents( $this->tempDir . '/dir6/file1.txt', 'test' );
43 file_put_contents( $this->tempDir . '/dir6/file2.txt', 'test' );
44 chmod( $this->tempDir . '/dir4/file1.txt', 0 );
45 chmod( $this->tempDir . '/dir5', 0 );
46 chmod( $this->tempDir . '/dir6', 0400 );
47 }
49 protected function tearDown()
50 {
51 chmod( $this->tempDir . '/dir5', 0700 );
52 chmod( $this->tempDir . '/dir6', 0700 );
home.php (https://bitbucket.org/robertryanpitts/qahub-php.git) PHP · 102 lines
1 <?php
2 require_once('includes/config.php');
3 require_once('authorize.php');
4 ?>
5 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
7 <head>
8 <title>QA Hub | Admin | Welcome</title>
9 <?php
10 require_once('includes/meta.php');
13 <body>
14 <div id="content-wrapper">
15 <?php
16 require_once('header.php');
17 ?>
18 <div id="main-wrapper">
19 <?php
20 require_once('menunav.php');
module.master.php (https://github.com/oiuv/phpems.git) PHP · 280 lines
1 <?php
3 /*
4 * This file is part of the phpems/phpems.
5 *
6 * (c) oiuv <i@oiuv.cn>
39 'message' => '操作成功',
40 'callbackType' => 'forward',
41 'forwardUrl' => "index.php?autoform-master-module-fields&moduleid={$moduleid}",
42 ];
43 exit(json_encode($message));
71 'message' => '操作成功',
72 'callbackType' => 'forward',
73 'forwardUrl' => "index.php?autoform-master-module-fields&moduleid={$moduleid}&page={$page}",
74 ];
75 } else {
zip.php (https://gitlab.com/Gashler/sg) PHP · 150 lines
1 <?php
2 defined('WYSIJA') or die('Restricted access');
3 class WYSIJA_help_zip extends WYSIJA_object{
54 $z = new ZipArchive();
56 // PHP4-compat - php4 classes can't contain constants
57 $zopen = $z->open($file, 4); // -- ZIPARCHIVE::CHECKCONS = 4
81 }
83 if(file_exists(ABSPATH . 'wp-admin/includes/class-pclzip.php')) require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');
85 $archive = new PclZip($file);
107 if ( $file['folder']){
108 $to=str_replace("/",DS,$to);
109 if(file_exists($to)) chmod($to,0777);
111 //$folderTest=str_replace(array("/"),array(DS),$to . $file['filename']);
Generator.php (https://gitlab.com/I-NOZex/quiz) PHP · 164 lines
1 <?php
2 namespace schmunk42\giiant\generators\test;
39 * @var string Search model's class name
40 */
41 public $searchModelClass = "";
43 /**
62 public function requiredTemplates()
63 {
64 return ['unit.php'];
65 }
136 //TODO: Add unit tests for search model
137 //if($this->searchModelClass !=="")
138 //{
139 //}
mf_install.php (https://github.com/leocaseiro/Magic-Fields-2.git) PHP · 212 lines
1 <?php
2 /**
3 * This file content the routines for install/activate uninstall/deactivate Magic Fields
8 global $wpdb;
10 require_once(ABSPATH.'wp-admin/includes/upgrade.php');
12 // Get collation info
135 if ($dir_list2 != ""){
136 echo "<div id='magic-fields-install-error-message' class='error'><p><strong>".__('Magic Fields is not ready yet.', $mf_domain)."</strong> ".__('must create the following folders (and must chmod 777):', $mf_domain)."</p><ul>";
137 echo $dir_list2;
138 echo "</ul></div>";
139 }
140 if ($dir_list != ""){
141 echo "<div id='magic-fields-install-error-message-2' class='error'><p><strong>".__('Magic Fields is not ready yet.', $mf_domain)."</strong> ".__('The following folders must be writable (usually chmod 777 is neccesary):', $mf_domain)."</p><ul>";
142 echo $dir_list;
143 echo "</ul></div>";
Makefile (https://github.com/Knight-Mozilla/FollowThis.git) Makefile · 257 lines
83 > ${DESTDIR}/polish.php
84 @chmod 644 polish.php ${DESTDIR}/polish.php
86 english: english.php
113 > ${DESTDIR}/spanish.php
114 @chmod 644 spanish.php ${DESTDIR}/spanish.php
116 italian: italian.php
125 > ${DESTDIR}/chinese-sim.php
126 @chmod 644 chinese-sim.php ${DESTDIR}/chinese-sim.php
128 chinese-tr: chinese-tr.php
208 > ${DESTDIR}/afrikaans.php
209 @chmod 644 afrikaans.php ${DESTDIR}/afrikaans.php
211 hungarian: hungarian.php
ext_ftp.php (https://gitlab.com/Blueprint-Marketing/hhvm) PHP · 265 lines
1 <?hh
2 // @generated by idl-to-hni.php
4 /* Sends an ALLO command to the remote FTP server to allocate space for a file
29 */
30 <<__Native("ZendCompat")>>
31 function ftp_chmod(mixed $ftp_stream,
32 mixed $mode,
33 mixed $filename): mixed;
250 * host. Why this function may not exist ftp_ssl_connect() is only available
251 * if both the ftp module and the OpenSSL support is built statically into
252 * php, this means that on Windows this function will be undefined in the
253 * official PHP builds. To make this function available on Windows you must
254 * compile your own PHP binaries. ftp_ssl_connect() is not intended for use
255 * with sFTP. To use sFTP with PHP, please see ssh2_sftp().
Content.php (https://bitbucket.org/ferOnti/processmaker.git) PHP · 142 lines
Translation.php (https://bitbucket.org/ferOnti/processmaker.git) PHP · 143 lines
files_lang.php (https://github.com/marcoscoelho/pyrocms.git) PHP · 100 lines
1 <?php defined('BASEPATH') OR exit('No direct script access allowed');
3 /**
96 $lang['file_folders.no_folders'] = 'I tuoi file sono ordinati per cartelle, attualmente non hai configurato nessuna cartella.';
97 $lang['file_folders.mkdir_error'] = 'Impossibile creare la cartella uploads/files';
98 $lang['file_folders.chmod_error'] = 'Impossibile effettuare il chmod della cartella uploads/files';
100 /* End of file files_lang.php */
FileLockRegion.php (https://gitlab.com/martinstti/silex-microframework-rest) PHP · 265 lines
File.php (https://bitbucket.org/sevenly/magento-ce.git) PHP · 274 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
124 $this->_open($mode);
126 $this->_chmod = $chmod;
127 }
174 $this->_close();
175 $this->_fileHandler = false;
176 @chmod($this->_filePath, $this->_chmod);
177 }
class-ai1wm-extractor.php (https://gitlab.com/haque.mdmanzurul/neophix) PHP · 296 lines
Files.php (https://github.com/Asherontas/Active-CMS.git) PHP · 215 lines
1 <?php
2 /**
3 * File Utilities.
4 * @author Wei Zhuo
5 * @version $Id: Files.php,v 1.2 2006/12/16 21:38:13 thierrybo Exp $
6 * @package ImageManager
7 */
15 * File Utilities
16 * @author Wei Zhuo
17 * @version $Id: Files.php,v 1.2 2006/12/16 21:38:13 thierrybo Exp $
18 * @package ImageManager
19 * @subpackage files
80 {
81 mkdir ($newFolder, 0755);
82 return chmod($newFolder, 0755);
83 }
Libupload.php (https://github.com/ekoisa/pyrocms-shop.git) PHP · 256 lines
Process.php (https://bitbucket.org/ferOnti/processmaker.git) PHP · 210 lines
vfsStreamFileTestCase.php (https://github.com/theosp/google_appengine.git) PHP · 278 lines
1 <?php
2 /**
3 * This file is part of vfsStream.
12 * Test for org\bovigo\vfs\vfsStreamFile.
13 */
14 class vfsStreamFileTestCase extends \PHPUnit_Framework_TestCase
15 {
16 /**
202 {
203 $this->assertEquals(0666, $this->file->getPermissions());
204 $this->assertSame($this->file, $this->file->chmod(0644));
205 $this->assertEquals(0644, $this->file->getPermissions());
206 }
216 $this->file = new vfsStreamFile('foo', 0644);
217 $this->assertEquals(0644, $this->file->getPermissions());
218 $this->assertSame($this->file, $this->file->chmod(0600));
219 $this->assertEquals(0600, $this->file->getPermissions());
220 }
lib.auth.php (https://github.com/stamen/fieldpapers.git) PHP · 191 lines
wp_install_auto.sh (https://gitlab.com/auchalet/wp-autodeploy) Shell · 233 lines
26 #Pré-requis
27 sudo apt-get update
28 sudo apt-get install apache2 php5 mysql-server libapache2-mod-php5 php5-mysql
30 echo "============================================"
110 "
112 echo "-> Configuration du wp-config.php"
114 #create wp config
115 cp wp-config-sample.php wp-config.php
117 #set database details with perl find and replace
connection.php (https://github.com/leonardteo/INSE6530.git) PHP · 234 lines
1 <?php
2 /**
3 * PDO database connection.
7 * @author Kohana Team
8 * @copyright (c) 2008-2009 Kohana Team
9 * @license http://kohanaphp.com/license
10 */
158 if ($as_object === FALSE)
159 {
160 $result->setFetchMode(\PDO::FETCH_ASSOC);
161 }
162 elseif (is_string($as_object))
163 {
164 $result->setFetchMode(\PDO::FETCH_CLASS, $as_object);
165 }
166 else
Pdo.php (https://github.com/bhaumik25/zend-framework.git) PHP · 433 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Mysqli.php 4874 2007-05-19 01:26:32Z bkarwin $
21 */
24 * @see Zend_Db_Statement
25 */
26 require_once 'Zend/Db/Statement.php';
28 /**
51 * @var int
52 */
53 protected $_fetchMode = PDO::FETCH_ASSOC;
55 /**
DbPanel.php (https://gitlab.com/Griffolion/Game-Embargo-Tracker) PHP · 193 lines
1 <?php
2 /**
3 * @link http://www.yiiframework.com/
80 public function getDetail()
81 {
82 $searchModel = new Db();
83 $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams(), $this->getModels());
86 'panel' => $this,
87 'dataProvider' => $dataProvider,
88 'searchModel' => $searchModel,
89 ]);
90 }
files_lang.php (https://github.com/marcoscoelho/pyrocms.git) PHP · 99 lines
1 <?php defined('BASEPATH') OR exit('No direct script access allowed');
3 /**
95 $lang['file_folders.no_folders'] = 'Your files are sorted by folders, currently you do not have any folders setup.';
96 $lang['file_folders.mkdir_error'] = 'התרחשה שגיעה בעת ביצוע פקודה "make uploads/files"!';
97 $lang['file_folders.chmod_error'] = 'התרחשהשגיעה בעת ביצוע פקודה "chmod uploads/files"!';
99 /* End of file files_lang.php */
StreamHandler.php (https://github.com/sendtogeo/Seo-Panel.git) PHP · 176 lines
1 <?php
3 /*
17 * Stores to any stream resource
18 *
19 * Can be used to store into php://stderr, remote and local files, etc.
20 *
21 * @author Jordi Boggiano <j.boggiano@seld.be>
100 $this->stream = fopen($this->url, 'a');
101 if ($this->filePermission !== null) {
102 @chmod($this->url, $this->filePermission);
103 }
104 restore_error_handler();
LogTarget.php (https://gitlab.com/itlboy/yii2-starter-installed) PHP · 183 lines
1 <?php
2 /**
3 * @link http://www.yiiframework.com/
57 file_put_contents($dataFile, serialize($data));
58 if ($this->module->fileMode !== null) {
59 @chmod($dataFile, $this->module->fileMode);
60 }
101 if ($this->module->fileMode !== null) {
102 @chmod($indexFile, $this->module->fileMode);
103 }
104 }
File.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 274 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
124 $this->_open($mode);
126 $this->_chmod = $chmod;
127 }
174 $this->_close();
175 $this->_fileHandler = false;
176 @chmod($this->_filePath, $this->_chmod);
177 }
class.ilECSNodeMappingAssignments.php (https://github.com/ILIAS-eLearning/ILIAS.git) PHP · 287 lines
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4 include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignment.php';
6 /**
30 'AND ref_id > 0';
31 $res = $ilDB->query($query);
32 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
33 return true;
34 }
63 $settings = array();
64 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
65 $settings['title_update'] = $row->title_update;
66 $settings['position_update'] = $row->position_update;
class.ilMD5295MetaMetadata.php (https://github.com/ILIAS-eLearning/ILIAS.git) PHP · 288 lines
1 <?php
2 /*
3 +-----------------------------------------------------------------------------+
29 * @version $Id$
30 */
31 include_once 'class.ilMD5295Base.php';
33 class ilMD5295MetaMetadata extends ilMD5295Base
45 public function &getIdentifierIds()
46 {
47 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Identifier.php';
49 return ilMD5295Identifier::_getIds($this->getRBACId(), $this->getObjId(), $this->getMetaId(), 'meta_meta_data');
51 public function &getIdentifier($a_identifier_id)
52 {
53 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295Identifier.php';
55 if (!$a_identifier_id) {
Adapter.php (https://gitlab.com/habracoder/advertising) PHP · 461 lines
1 <?php
3 namespace Phalcon\Db {
69 *
70 * @param string $sqlQuery
71 * @param int $fetchMode
72 * @param array $bindParams
73 * @param array $bindTypes
74 * @return array
75 */
76 public function fetchOne($sqlQuery, $fetchMode=null, $bindParams=null, $bindTypes=null){ }
95 *
96 * @param string $sqlQuery
97 * @param int $fetchMode
98 * @param array $bindParams
99 * @param array $bindTypes
FileSystem_LocalTest.php (https://github.com/ThiloWitt/core.git) PHP · 311 lines
1 <?php
2 require_once dirname(__FILE__) . '/../../../../bootstrap.php';
4 // exclude the following file from code coverage reports.
5 PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(dirname(__FILE__). '/../../../../../src/lib/Zikula/FileSystem/Facade/Local.php');
7 /**
8 * Zikula_FileSystem_Local test case.
9 */
10 class Zikula_FileSystem_LocalTest extends PHPUnit_Framework_TestCase
11 {
141 {
142 // Configure the stub.
143 $handle = fopen('php://temp', 'r+');
144 $stub = $this->getMock('Zikula_FileSystem_Facade_Local');
145 $stub->expects($this->any())
Serializer.php (https://github.com/erochest/Omeka.git) PHP · 313 lines
284 // we can chmod it ourselves
285 $chmod = $chmod | 0700;
286 if (chmod($dir, $chmod)) {
288 }
289 } elseif (filegroup($dir) === posix_getgid()) {
290 $chmod = $chmod | 0070;
291 } else {
292 // PHP's probably running as nobody, so we'll
293 // need to give global permissions
294 $chmod = $chmod | 0777;
295 }
296 trigger_error(
297 'Directory ' . $dir . ' not writable, ' .
298 'please chmod to ' . decoct($chmod),
299 E_USER_WARNING
300 );
CategoryAction.class.php (http://iiccms.googlecode.com/svn/trunk/) PHP · 196 lines
1 <?php
2 class CategoryAction extends GlobalAction
3 {
189 case 'setStatus': parent::_setStatus('set');break;
190 case 'unSetStatus': parent::_setStatus('unset');break;
191 case 'update': parent::_batchModify(0, $_POST, array('display_order'), __URL__, 'Category', 'display_order DESC,id DESC');break;
192 default: parent::_message('error', '??????') ;
193 }
pdo.php (https://github.com/azhai2012/calf.git) PHP · 253 lines
1 <?php defined('SYSPATH') or die('No direct script access.');
2 /**
3 * PDO database connection.
7 * @author Kohana Team
8 * @copyright (c) 2008-2009 Kohana Team
9 * @license http://kohanaphp.com/license
10 */
11 class Kohana_Database_PDO extends Database {
74 * [!!] Works only with SQLite
75 *
76 * @link http://php.net/manual/function.pdo-sqlitecreateaggregate
77 *
78 * @param string $name Name of the SQL function to be created or redefined
97 * [!!] Works only with SQLite
98 *
99 * @link http://php.net/manual/function.pdo-sqlitecreatefunction
100 *
101 * @param string $name Name of the SQL function to be created or redefined
web.md (https://github.com/randomuserid/Adama.git) Markdown · 117 lines
21 | Execution | php easteregg request |
22 | Behavioral Detection | php setup activity |
23 | Execution | tilde in uri - potential .php~ source disclosure vulnerability |
24 | Behavioral Detection | web-php phpinfo access |
25 | Behavioral Detection | web-php phpinfo access |
60 | Execution | Large http request |
61 | Behavioral Detection | Linux /tmp reference - /tmp |
62 | Behavioral Detection | Linux commands - curl,chmod,echo,exec, wget |
63 | Behavioral Detection | Long byte counts in web requests |
64 | Behavioral Detection | Long uris with null referrers |
74 | Execution | Passw=' or pass=' in uri |
75 | Execution | Pcrat/gh0st |
76 | Execution | Php errors - php warning: php fatal error: php parse error: |
77 | Behavioral Detection | Php net utils |
FmRxControls.java (https://github.com/SivanLiu/HwFrameWorkSource.git) Java · 232 lines
23 private static final int V4L2_CID_PRIVATE_TAVARUA_SIGNAL_TH = 134217736;
24 private static final int V4L2_CID_PRIVATE_TAVARUA_SPACING = 134217742;
25 private static final int V4L2_CID_PRIVATE_TAVARUA_SRCHMODE = 134217729;
26 private static final int V4L2_CID_PRIVATE_TAVARUA_SRCHON = 134217731;
27 private static final int V4L2_CID_PRIVATE_TAVARUA_SRCH_CNT = 134217739;
87 public int searchStationList(int fd, int mode, int preset_num, int dir, int pty) {
88 int re = FmReceiverWrapper.setControlNative(fd, V4L2_CID_PRIVATE_TAVARUA_SRCHMODE, mode);
89 if (re != 0) {
90 return re;
193 stringBuilder.append(pi);
194 stringBuilder.append(" id ");
195 stringBuilder.append(V4L2_CID_PRIVATE_TAVARUA_SRCHMODE);
196 Log.d(str, stringBuilder.toString());
197 int re = FmReceiverWrapper.setControlNative(fd, V4L2_CID_PRIVATE_TAVARUA_SRCHMODE, mode);
index.php (https://gitlab.com/joepa37/ierschool.dev) PHP · 131 lines
1 <?php
3 use common\grid\columns\DateRangePicker\DateRangePicker;
13 /* @var $this yii\web\View */
14 /* @var $searchModel common\comment\models\search\CommentSearch */
15 /* @var $dataProvider yii\data\ActiveDataProvider */
23 <div class="panel-body">
25 <?php
26 Pjax::begin([
27 'id' => 'comment-grid-pjax',
34 echo GridQuickLinks::widget([
35 'model' => Comment::className(),
36 'searchModel' => $searchModel,
37 'options' => [
38 ['label' => Yii::t('core', 'All'), 'filterWhere' => []],
DefaultController.php (https://gitlab.com/Sang240892/real-estate-system) PHP · 231 lines
46 return $this->render('index', [
47 'searchModel' => $searchModel,
48 'dataProvider' => $dataProvider,
49 ]);
118 return $this->render('update', [
119 'model' => $model,
120 // 'historySearchModel' => $historySearchModel,
121 // 'historyDataProvider' => $historyDataProvider,
122 ]);
181 'model' => $model,
182 'user'=>$user,
183 'searchModel' => $searchModel,
184 'dataProvider' => $dataProvider,
185 ]);
davuser__lighttpdlib.php (https://bitbucket.org/Nemcio/kloxo-mr.git) PHP · 90 lines
1 <?php
3 class davuser__lighttpd extends Lxdriverclass {
40 $string .= "\$HTTP[\"host\"] =~ \"^$v\" {\n";
41 $string .= "server.document-root = \"/usr/local/lxlabs/kloxo/httpdocs/webdisk/\"\n";
42 $string .= "cgi.assign = ( \".php\" => \"/home/httpd/$v/davsuexec.sh\" )\n";
43 $string .= $this->getDirprotectCore($v);
44 $string .= "}\n\n\n";
74 $string .= "export MUID=$uid\n";
75 $string .= "export GID=$gid\n";
76 $string .= " export PHPRC=/usr/local/lxlabs/ext/php/etc/php.ini\n";
77 $string .= "export TARGET=<%program%>\n";
78 $string .= "export NON_RESIDENT=1\n";
79 $string .= "exec lxsuexec $*\n";
80 $st = str_replace("<%program%>", "/usr/local/lxlabs/ext/php/bin/php_cgi", $string);
81 lfile_put_contents("__path_httpd_root/{$this->main->getParentName()}/davsuexec.sh", $st);
82 lxfile_unix_chmod("__path_httpd_root/{$this->main->getParentName()}/davsuexec.sh", "0755");
Status.php (https://gitlab.com/daigiangaitu91/magento) PHP · 221 lines
1 <?php
2 /**
3 * Copyright © 2015 Magento. All rights reserved.
127 $isNewFile = !file_exists($filePath);
128 if (!$isNewFile && file_get_contents($filePath)) {
129 $text = $newline ? PHP_EOL . "{$text}" :"{$text}";
130 }
131 if (false === file_put_contents($filePath, $text, FILE_APPEND)) {
133 }
134 if ($isNewFile) {
135 chmod($filePath, 0777);
136 }
137 return $this;
func_attachments.php (https://github.com/sidisinsane/TrellisDesk.git) PHP · 260 lines
1 <?php
3 /**
106 if ( ! @move_uploaded_file( $file['tmp_name'], $upload_location ) ) $this->trellis->skin->ajax_output( json_encode( array( 'error' => true, 'errormsg' => $this->trellis->lang['error_upload_move'] ) ) );
108 # TODO: only run chmod if web user is 'nobody' (just have a setting)
109 @chmod( $upload_location, 0666 );
linux_sysent.c (https://github.com/deathmaker1/kame.git) C · 207 lines
37 { 1, (sy_call_t *)linux_time }, /* 13 = linux_time */
38 { 3, (sy_call_t *)linux_mknod }, /* 14 = linux_mknod */
39 { 2, (sy_call_t *)linux_chmod }, /* 15 = linux_chmod */
40 { 3, (sy_call_t *)linux_lchown }, /* 16 = linux_lchown */
41 { 1, (sy_call_t *)linux_break }, /* 17 = linux_break */
116 { 2, (sy_call_t *)linux_truncate }, /* 92 = linux_truncate */
117 { 2, (sy_call_t *)oftruncate }, /* 93 = oftruncate */
118 { 2, (sy_call_t *)fchmod }, /* 94 = fchmod */
119 { 3, (sy_call_t *)fchown }, /* 95 = fchown */
120 { 2, (sy_call_t *)getpriority }, /* 96 = getpriority */
io.pl (https://github.com/wyona/lenya.git) Perl · 127 lines
class-wp-filesystem-ftpsockets.php (https://github.com/pkht/Brunel.git) PHP · 327 lines
1 <?php
2 /**
3 * WordPress FTP Sockets Filesystem.
26 //Check if possible to use ftp functions.
27 if ( ! @include_once ABSPATH . 'wp-admin/includes/class-ftp.php' )
28 return false;
29 $this->ftp = new ftp();
153 }
155 function chmod($file, $mode = false, $recursive = false ) {
157 if ( ! $mode ) {
269 if ( ! $chmod )
270 $chmod = FS_CHMOD_DIR;
271 $this->chmod($path, $chmod);
DB.php (https://github.com/durand54/sitellite.git) PHP · 425 lines
143 * mode is selected.
144 */
145 function setFetchMode($fetchmode, $object_class = null) {
146 switch ($fetchmode) {
297 function Cache_DB_Result(&$rows, $fetchmode, $fetchmode_object_class) {
298 $this->rows = $rows;
299 $this->fetchmode = $fetchmode;
300 $this->fetchmode_object_class = $fetchmode_object_class;
320 if ($fetchmode === DB_FETCHMODE_OBJECT) {
321 $fetchmode = DB_FETCHMODE_ASSOC;
322 $return_object = true;
323 }
373 * @return mixed DB_OK on success, NULL on no more rows
374 */
375 function fetchInto(&$row, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum = null) {
376 if ($row = $this->fetchRow($fetchmode, $rownum)) {
install.rsform.php (https://github.com/shafiqissani/Jewelery-Ecommerce-.git) PHP · 73 lines
1 <?php
2 /**
3 * @version 1.2.0
14 {
15 //Init RS Adapter
16 require_once(dirname(__FILE__).'/../../../components/com_rsform/controller/adapter.php');
17 require_once(dirname(__FILE__).'/../../../components/com_rsform/controller/functions.php');
22 //require backend language file
23 require_once(_RSFORM_FRONTEND_ABS_PATH.'/languages/'._RSFORM_FRONTEND_LANGUAGE.'.php');
25 $message = '';
37 //Try setting directories permissions
38 $result = @chmod(_RSFORM_BACKEND_ABS_PATH.'/tmp/',0777);
39 if($result==true) $message .= sprintf(_RSFORM_INSTALLER_PERMISSIONS_OK,_RSFORM_BACKEND_ABS_PATH.'/tmp/','0777');
40 else $message .= sprintf(_RSFORM_INSTALLER_PERMISSIONS_ERROR,_RSFORM_BACKEND_ABS_PATH.'/tmp/','0777');
vfsStreamFileTestCase.php (https://github.com/wiltave/vfsStream.git) PHP · 254 lines
1 <?php
2 /**
3 * Test for org::bovigo::vfs::vfsStreamFile.
8 require_once 'org/bovigo/vfs/vfsStreamFile.php';
9 require_once 'PHPUnit/Framework.php';
10 /**
11 * Test for org::bovigo::vfs::vfsStreamFile.
14 * @subpackage test
15 */
16 class vfsStreamFileTestCase extends PHPUnit_Framework_TestCase
17 {
18 /**
204 {
205 $this->assertEquals(0666, $this->file->getPermissions());
206 $this->assertSame($this->file, $this->file->chmod(0644));
207 $this->assertEquals(0644, $this->file->getPermissions());
208 }
foxpro.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 1859 lines
Makefile.in.in (https://freespeech.svn.sourceforge.net/svnroot/freespeech) Unknown · 250 lines
configure
(http://google-perftools.googlecode.com/svn/trunk/)
Shell · 19833 lines
✨ Summary
This shell script generates a configuration file for a build system, likely Autotools. It defines various settings and options for building a library or executable, such as compiler flags, library search paths, and export symbols. The script also handles silent mode, error checking, and output redirection to ensure proper configuration and build process.
This shell script generates a configuration file for a build system, likely Autotools. It defines various settings and options for building a library or executable, such as compiler flags, library search paths, and export symbols. The script also handles silent mode, error checking, and output redirection to ensure proper configuration and build process.
pre-post.py
(https://bitbucket.org/scons/scons/)
Python · 214 lines
✨ Summary
This Python script tests the AddPreAction and AddPostAction functions in SCons, a build tool. It creates several test cases to verify that pre- and post-build actions are executed correctly for different scenarios, including programs, builders, and custom commands. The script runs each test case and checks the output to ensure it matches the expected results.
This Python script tests the AddPreAction and AddPostAction functions in SCons, a build tool. It creates several test cases to verify that pre- and post-build actions are executed correctly for different scenarios, including programs, builders, and custom commands. The script runs each test case and checks the output to ensure it matches the expected results.
53 f.write("Foo\\n")
54 f.close()
55 os.chmod(a, os.stat(a)[stat.ST_MODE] | stat.S_IXUSR)
56 f=open("before.txt", "ab")
57 f.write(os.path.splitext(str(target[0]))[0] + "\\n")
66 fout.close()
67 fin.close()
68 os.chmod(a, os.stat(a)[stat.ST_MODE] | stat.S_IXUSR)
70 foo = env.Program(source='foo.c', target='foo')
PDOSQLExecTask.php
(http://openirudi.googlecode.com/svn/trunk/)
PHP · 615 lines
✨ Summary
This PHP code defines a class PDOSQLExec
that executes SQL commands and processes results. It logs execution progress, handles errors, and formats output using configured formatters. The class also manages transactions, allowing multiple files or blocks of statements to be executed with the same connection and commit operation. It provides methods for adding text, running transactions, and processing results.
This PHP code defines a class PDOSQLExec
that executes SQL commands and processes results. It logs execution progress, handles errors, and formats output using configured formatters. The class also manages transactions, allowing multiple files or blocks of statements to be executed with the same connection and commit operation. It provides methods for adding text, running transactions, and processing results.
1 <?php
2 /*
3 * $Id: CreoleSQLExecTask.php 83 2006-07-07 18:17:00Z mrook $
20 */
22 require_once 'phing/tasks/ext/pdo/PDOTask.php';
23 include_once 'phing/system/io/StringReader.php';
24 include_once 'phing/tasks/ext/pdo/PDOSQLExecFormatterElement.php';
26 /**
137 * @var int
138 */
139 private $fetchMode;
141 /**
Introduction (http://omnia2droid.googlecode.com/svn/trunk/) Unknown · 460 lines
wscript (git://github.com/OpenRTMFP/ArcusNode.git) Unknown · 56 lines
39 rtmfp.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall", "-L/usr/lib", "-lssl"]
40 rtmfp.chmod = 0755
41 rtmfp.target = 'rtmfp'
42 rtmfp.source = 'src/rtmfp.cc'
49 keyExchange.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall", "-L/usr/lib", "-lssl"]
50 keyExchange.chmod = 0755
51 keyExchange.target = 'keyexchange'
52 keyExchange.source = 'src/keyexchange.cc'
install-sh
(https://freespeech.svn.sourceforge.net/svnroot/freespeech)
Shell · 252 lines
✨ Summary
This shell script, install
, is a utility for installing files and directories on a system. It takes input from the user, including source file/directory, destination directory, and options (e.g., ownership, permissions). The script creates the destination directory if necessary, moves or copies the file to it, and applies any specified transformations or modifications before renaming the final executable.
This shell script, install
, is a utility for installing files and directories on a system. It takes input from the user, including source file/directory, destination directory, and options (e.g., ownership, permissions). The script creates the destination directory if necessary, moves or copies the file to it, and applies any specified transformations or modifications before renaming the final executable.
35 mvprog="${MVPROG-mv}"
36 cpprog="${CPPROG-cp}"
37 chmodprog="${CHMODPROG-chmod}"
38 chownprog="${CHOWNPROG-chown}"
39 chgrpprog="${CHGRPPROG-chgrp}"
45 transform_arg=""
46 instcmd="$mvprog"
47 chmodcmd="$chmodprog 0755"
48 chowncmd=""
49 chgrpcmd=""
65 continue;;
67 -m) chmodcmd="$chmodprog $2"
68 shift
69 shift
Toggle_ReadOnly.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 88 lines
Makefile.in (https://bitbucket.org/freebsd/freebsd-head/) Unknown · 718 lines
410 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
411 if test -d "$(distdir)/$$file"; then \
412 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
413 fi; \
414 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
415 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
416 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
417 fi; \
418 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
547 for file in $$foo; do \
548 x=$(DESTDIR)$(bindir)/$$file; \
549 if chown 0:0 $$x && chmod u+s $$x; then :; else \
550 echo "*"; \
551 echo "* Failed to install $$x setuid root"; \