当前位置: 首页>>代码示例>>PHP>>正文


PHP oos_get_local_path函数代码示例

本文整理汇总了PHP中oos_get_local_path函数的典型用法代码示例。如果您正苦于以下问题:PHP oos_get_local_path函数的具体用法?PHP oos_get_local_path怎么用?PHP oos_get_local_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了oos_get_local_path函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: oos_redirect_admin

        case 'deleteconfirm':
            if (strstr($_GET['file'], '..')) {
                oos_redirect_admin(oos_href_link_admin($aFilename['export_googlebase']));
            }
            oos_remove(OOS_FEEDS_EXPORT_PATH . '/' . $_GET['file']);
            if (!$oos_remove_error) {
                $messageStack->add_session(SUCCESS_EXPORT_DELETED, 'success');
                oos_redirect_admin(oos_href_link_admin($aFilename['export_googlebase']));
            }
            break;
    }
}
// check if the backup directory exists
$dir_ok = false;
if (is_dir(oos_get_local_path(OOS_FEEDS_EXPORT_PATH))) {
    if (is_writeable(oos_get_local_path(OOS_FEEDS_EXPORT_PATH))) {
        $dir_ok = true;
    } else {
        $messageStack->add(ERROR_EXPORT_DIRECTORY_NOT_WRITEABLE, 'error');
    }
} else {
    $messageStack->add(ERROR_EXPORT_DIRECTORY_DOES_NOT_EXIST, 'error');
}
$no_js_general = true;
require 'includes/oos_header.php';
?>
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td width="<?php 
echo BOX_WIDTH;
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:export_googlebase.php

示例2: oos_db_prepare_input

     $manufacturers_id = oos_db_prepare_input($_GET['mID']);
 }
 $manufacturers_name = oos_db_prepare_input($_POST['manufacturers_name']);
 $sql_data_array = array('manufacturers_name' => $manufacturers_name);
 if ($action == 'insert') {
     $insert_sql_data = array('date_added' => '" . date("Y-m-d H:i:s", time()) . "');
     $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
     oos_db_perform($oostable['manufacturers'], $sql_data_array);
     $manufacturers_id = $dbconn->Insert_ID();
 } elseif ($action == 'save') {
     $update_sql_data = array('last_modified' => '" . date("Y-m-d H:i:s", time()) . "');
     $sql_data_array = array_merge($sql_data_array, $update_sql_data);
     oos_db_perform($oostable['manufacturers'], $sql_data_array, 'update', "manufacturers_id = '" . oos_db_input($manufacturers_id) . "'");
 }
 $manufacturers_image = oos_get_uploaded_file('manufacturers_image');
 $image_directory = oos_get_local_path(OOS_ABSOLUTE_PATH . OOS_IMAGES);
 if (is_uploaded_file($manufacturers_image['tmp_name'])) {
     if (!is_writeable($image_directory)) {
         if (is_dir($image_directory)) {
             $messageStack->add_session(sprintf(ERROR_DIRECTORY_NOT_WRITEABLE, $image_directory), 'error');
         } else {
             $messageStack->add_session(sprintf(ERROR_DIRECTORY_DOES_NOT_EXIST, $image_directory), 'error');
         }
     } else {
         $dbconn->Execute("UPDATE " . $oostable['manufacturers'] . " SET manufacturers_image = '" . $manufacturers_image['name'] . "' WHERE manufacturers_id = '" . oos_db_input($manufacturers_id) . "'");
         oos_get_copy_uploaded_file($manufacturers_image, $image_directory);
     }
 }
 $languages = oos_get_languages();
 for ($i = 0, $n = count($languages); $i < $n; $i++) {
     $manufacturers_url_array = oos_db_prepare_input($_POST['manufacturers_url']);
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:manufacturers.php

示例3: oosDBInit

/**
 * Initializes the database connection.
 *
 * This function loads up ADODB  and starts the database
 * connection using the required parameters then it sets
 * the table prefixes and xartables up and returns true
 *
 * @access protected
 * @global object db database connection object
 * @global integer ADODB_FETCH_MODE array fectching by associative or numeric keyed arrays
 * @global array oosDB_tables database tables used by OOS [OSIS Online Shop]
 * @return bool true on success, false on failure
 */
function oosDBInit()
{
    // Get database parameters
    $dbtype = OOS_DB_TYPE;
    $dbhost = OOS_DB_SERVER;
    $dbname = OOS_DB_DATABASE;
    // Decode encoded DB parameters
    if (OOS_ENCODED == '1') {
        $dbuname = base64_decode(OOS_DB_USERNAME);
        $dbpass = base64_decode(OOS_DB_PASSWORD);
    } else {
        $dbuname = OOS_DB_USERNAME;
        $dbpass = OOS_DB_PASSWORD;
    }
    // Start connection
    global $ADODB_CACHE_DIR;
    $ADODB_CACHE_DIR = oos_get_local_path(OOS_TEMP_PATH . 'adodb_cache/');
    $dbconn = ADONewConnection($dbtype);
    if (!$dbconn->Connect($dbhost, $dbuname, $dbpass, $dbname)) {
        $dbpass = "****";
        $dbuname = "****";
        die("{$dbtype}://{$dbuname}:{$dbpass}@{$dbhost}/{$dbname} failed to connect " . $dbconn->ErrorMsg());
    }
    if (function_exists('memcache_pconnect')) {
        $dbconn->memCache = true;
        // should we use memCache instead of caching in files
        $dbconn->memCacheHost = '126.0.1.1';
        // $db->memCacheHost = array($ip1, $ip2, $ip3); // $db->memCacheHost = $ip1; still works
        $dbconn->memCachePort = '11211';
        // this is default memCache port
        $dbconn->memCacheCompress = false;
        // Use '1' to store the item compressed (uses zlib)
    }
    global $ADODB_FETCH_MODE;
    $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
    //$dbconn->debug = true;
    if (OOS_LOG_SQL == '1') {
        include 'includes/lib/adodb/adodb-perf.inc.php';
        adodb_perf::table(ADODB_LOGSQL_TABLE);
        $dbconn->LogSQL();
    }
    $GLOBALS['oosDB_connections'][0] =& $dbconn;
    $GLOBALS['oosDB_tables'] = array();
    return true;
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:58,代码来源:function_db.php

示例4: oos_redirect_admin

     }
     break;
 case 'insert':
     if (mkdir($_SESSION['current_path'] . '/' . $_POST['folder_name'], 0777)) {
         oos_redirect_admin(oos_href_link_admin($aFilename['file_manager'], 'info=' . urlencode($_POST['folder_name'])));
     }
     break;
 case 'save':
     if ($fp = fopen($_SESSION['current_path'] . '/' . $_POST['filename'], 'w+')) {
         fputs($fp, stripslashes($_POST['file_contents']));
         fclose($fp);
         oos_redirect_admin(oos_href_link_admin($aFilename['file_manager'], 'info=' . urlencode($_POST['filename'])));
     }
     break;
 case 'processuploads':
     $_current_path = oos_get_local_path($_SESSION['current_path']);
     if (!is_writeable($_current_path)) {
         if (is_dir($_current_path)) {
             $messageStack->add_session(sprintf(ERROR_DIRECTORY_NOT_WRITEABLE, $_current_path), 'error');
         } else {
             $messageStack->add_session(sprintf(ERROR_DIRECTORY_DOES_NOT_EXIST, $_current_path), 'error');
         }
     } else {
         for ($i = 1; $i < 6; $i++) {
             $file = oos_get_uploaded_file('file_' . $i);
             if (is_uploaded_file($file['tmp_name'])) {
                 oos_get_copy_uploaded_file($file, $_current_path);
             }
         }
     }
     oos_redirect_admin(oos_href_link_admin($aFilename['file_manager']));
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:file_manager.php

示例5: switch

 switch ($action) {
     case 'setflag':
         if ($_GET['flag'] == '0' || $_GET['flag'] == '1') {
             oos_set_banner_status($_GET['bID'], $_GET['flag']);
             $messageStack->add_session(SUCCESS_BANNER_STATUS_UPDATED, 'success');
         } else {
             $messageStack->add_session(ERROR_UNKNOWN_STATUS_FLAG, 'error');
         }
         oos_redirect_admin(oos_href_link_admin($aFilename['banner_manager'], 'page=' . $_GET['page'] . '&bID=' . $_GET['bID']));
         break;
     case 'insert':
     case 'update':
         $banners_group = empty($new_banners_group) ? oos_db_prepare_input($_POST['banners_group']) : $new_banners_group;
         $banners_image = oos_get_uploaded_file('banners_image');
         $db_image_location = '';
         $image_directory = oos_get_local_path(OOS_ABSOLUTE_PATH . OOS_IMAGES . $banners_image_target);
         $banner_error = false;
         if (empty($banners_title)) {
             $messageStack->add(ERROR_BANNER_TITLE_REQUIRED, 'error');
             $banner_error = true;
         }
         if (empty($banners_group)) {
             $messageStack->add(ERROR_BANNER_GROUP_REQUIRED, 'error');
             $banner_error = true;
         }
         if (isset($banners_image) && $banners_image['name'] != 'none' && is_uploaded_file($banners_image['tmp_name'])) {
             $store_image = false;
             if (!is_writeable($image_directory)) {
                 if (is_dir($image_directory)) {
                     $messageStack->add(sprintf(ERROR_IMAGE_DIRECTORY_NOT_WRITEABLE, $image_directory), 'error');
                 } else {
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:banner_manager.php

示例6: oos_remove

        if (strstr($_GET['file'], '..')) oos_redirect_admin(oos_href_link_admin($aFilename['export_preissuchmaschine']));

        oos_remove(OOS_PSM_PATH . $_GET['file']);
        if (!$oos_remove_error) {
          $messageStack->add_session(SUCCESS_PSM_DELETED, 'success');
          oos_redirect_admin(oos_href_link_admin($aFilename['export_preissuchmaschine']));
        }
        break;
    }
  }

// check if the preissuchmaschine directory exists
  $dir_ok = false;
  if (is_dir(oos_get_local_path(OOS_PSM_PATH))) {
    $dir_ok = true;
    if (!is_writeable(oos_get_local_path(OOS_PSM_PATH))) $messageStack->add(ERROR_PSM_DIRECTORY_NOT_WRITEABLE, 'error');
  } else {
    $messageStack->add(ERROR_PSM_DIRECTORY_DOES_NOT_EXIST, 'error');
  }
  $no_js_general = true;
  require 'includes/oos_header.php';
?>
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<?php require 'includes/oos_blocks.php'; ?>
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:export_psm.php

示例7: oos_redirect_admin

            if (strstr($_GET['file'], '..')) {
                oos_redirect_admin(oos_href_link_admin($aFilename['export_preissuchmaschine']));
            }
            oos_remove(OOS_PSM_PATH . $_GET['file']);
            if (!$oos_remove_error) {
                $messageStack->add_session(SUCCESS_PSM_DELETED, 'success');
                oos_redirect_admin(oos_href_link_admin($aFilename['export_preissuchmaschine']));
            }
            break;
    }
}
// check if the preissuchmaschine directory exists
$dir_ok = false;
if (is_dir(oos_get_local_path(OOS_PSM_PATH))) {
    $dir_ok = true;
    if (!is_writeable(oos_get_local_path(OOS_PSM_PATH))) {
        $messageStack->add(ERROR_PSM_DIRECTORY_NOT_WRITEABLE, 'error');
    }
} else {
    $messageStack->add(ERROR_PSM_DIRECTORY_DOES_NOT_EXIST, 'error');
}
$no_js_general = true;
require 'includes/oos_header.php';
?>
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td width="<?php 
echo BOX_WIDTH;
?>
" valign="top"><table border="0" width="<?php 
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:export_psm.php


注:本文中的oos_get_local_path函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。