• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP w2PgetConfig函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getEventLinks

/**
 * Sub-function to collect events within a period
 * @param Date the starting date of the period
 * @param Date the ending date of the period
 * @param array by-ref an array of links to append new items to
 * @param int the length to truncate entries by
 * @author Andrew Eddie <[email protected]>
 */
function getEventLinks($startPeriod, $endPeriod, &$links, $strMaxLen, $minical = false)
{
    global $event_filter;
    $events = CEvent::getEventsForPeriod($startPeriod, $endPeriod, $event_filter);
    $cwd = explode(',', w2PgetConfig('cal_working_days'));
    // assemble the links for the events
    foreach ($events as $row) {
        $start = new CDate($row['event_start_date']);
        $end = new CDate($row['event_end_date']);
        $date = $start;
        for ($i = 0, $i_cmp = $start->dateDiff($end); $i <= $i_cmp; $i++) {
            // the link
            // optionally do not show events on non-working days
            if ($row['event_cwd'] && in_array($date->getDayOfWeek(), $cwd) || !$row['event_cwd']) {
                if ($minical) {
                    $link = array();
                } else {
                    $url = '?m=calendar&a=view&event_id=' . $row['event_id'];
                    $link['href'] = '';
                    $link['alt'] = '';
                    $link['text'] = w2PtoolTip($row['event_title'], getEventTooltip($row['event_id']), true) . w2PshowImage('event' . $row['event_type'] . '.png', 16, 16, '', '', 'calendar') . '</a>&nbsp;' . '<a href="' . $url . '"><span class="event">' . $row['event_title'] . '</span></a>' . w2PendTip();
                }
                $links[$date->format(FMT_TIMESTAMP_DATE)][] = $link;
            }
            $date = $date->getNextDay();
        }
    }
}
开发者ID:joly,项目名称:web2project,代码行数:36,代码来源:links_events.php


示例2: testW2PgetConfig

 public function testW2PgetConfig()
 {
     global $w2Pconfig;
     $this->assertEquals('web2project.net', w2PgetConfig('site_domain'));
     $this->assertEquals(null, w2PgetConfig('NotGonnaBeThere'));
     $this->assertEquals('Some Default', w2PgetConfig('NotGonnaBeThere', 'Some Default'));
 }
开发者ID:illuminate3,项目名称:web2project,代码行数:7,代码来源:main_functions.test.php


示例3: db_connect

function db_connect($host = 'localhost', $dbname, $user = 'root', $passwd = '', $persist = false)
{
    global $db, $ADODB_FETCH_MODE;
    switch (strtolower(trim(w2PgetConfig('dbtype')))) {
        case 'oci8':
        case 'oracle':
            if ($persist) {
                $db->PConnect($host, $user, $passwd, $dbname) or die('FATAL ERROR: Connection to database server failed');
            } else {
                $db->Connect($host, $user, $passwd, $dbname) or die('FATAL ERROR: Connection to database server failed');
            }
            if (!defined('ADODB_ASSOC_CASE')) {
                define('ADODB_ASSOC_CASE', 0);
            }
            break;
        default:
            //mySQL
            if ($persist) {
                $db->PConnect($host, $user, $passwd, $dbname) or die('FATAL ERROR: Connection to database server failed');
            } else {
                $db->Connect($host, $user, $passwd, $dbname) or die('FATAL ERROR: Connection to database server failed');
            }
    }
    $ADODB_FETCH_MODE = ADODB_FETCH_BOTH;
}
开发者ID:joly,项目名称:web2project,代码行数:25,代码来源:db_adodb.php


示例4: __construct

 /**
  *	Object constructor to set table and key field
  *
  *	Can be overloaded/supplemented by the child class
  *	@param string $table name of the table in the db schema relating to child class
  *	@param string $key name of the primary key field in the table
  */
 public function __construct($table, $key)
 {
     $this->_tbl = $table;
     $this->_tbl_key = $key;
     $this->_tbl_prefix = w2PgetConfig('dbprefix', '');
     $this->_query = new DBQuery();
 }
开发者ID:joly,项目名称:web2project,代码行数:14,代码来源:w2p.class.php


示例5: index

 /**
  * parse file for indexing
  * @todo convert to using the FileSystem methods
  */
 public function index(CFile $file)
 {
     /* Workaround for indexing large files:
      ** Based on the value defined in config data,
      ** files with file_size greater than specified limit
      ** are not indexed for searching.
      ** Negative value :<=> no filesize limit
      */
     $index_max_file_size = w2PgetConfig('index_max_file_size', 0);
     if ($file->file_size > 0 && ($index_max_file_size < 0 || (int) $file->file_size <= $index_max_file_size * 1024)) {
         // get the parser application
         $parser = w2PgetConfig('parser_' . $file->file_type);
         if (!$parser) {
             $parser = w2PgetConfig('parser_default');
         }
         if (!$parser) {
             return false;
         }
         // buffer the file
         $file->_filepath = W2P_BASE_DIR . '/files/' . $file->file_project . '/' . $file->file_real_filename;
         if (file_exists($file->_filepath)) {
             $fp = fopen($file->_filepath, 'rb');
             $x = fread($fp, $file->file_size);
             fclose($fp);
             $ignore = w2PgetSysVal('FileIndexIgnoreWords');
             $ignore = $ignore['FileIndexIgnoreWords'];
             $ignore = explode(',', $ignore);
             $x = strtolower($x);
             $x = preg_replace("/[^A-Za-z0-9 ]/", "", $x);
             foreach ($ignore as $ignoreWord) {
                 $x = str_replace(" {$ignoreWord} ", ' ', $x);
             }
             $x = str_replace('  ', ' ', $x);
             $words = explode(' ', $x);
             foreach ($words as $index => $word) {
                 if ('' == trim($word)) {
                     continue;
                 }
                 $q = $this->query;
                 $q->addTable('files_index');
                 $q->addInsert('file_id', $file->file_id);
                 $q->addInsert('word', $word);
                 $q->addInsert('word_placement', $index);
                 $q->exec();
                 $q->clear();
             }
         } else {
             //TODO: if the file doesn't exist.. should we delete the db record?
         }
     }
     $file->file_indexed = 1;
     $file->store();
     return count($words);
 }
开发者ID:illuminate3,项目名称:web2project,代码行数:58,代码来源:Indexer.class.php


示例6: __construct

 /**
  *	Object constructor to set table and key field
  *
  *	Can be overloaded/supplemented by the child class
  *	@param string $table name of the table in the db schema relating to child class
  *	@param string $key name of the primary key field in the table
  *	@param (OPTIONAL) string $module name as stored in the 'mod_directory' of the 'modules' table, and the 'value' field of the 'gacl_axo' table.
  *          It is used for permission checking in situations where the table name is different from the module folder name.
  *          For compatibility sake this variable is set equal to the $table if not set as failsafe.
  */
 public function __construct($table, $key, $module = '')
 {
     $this->_tbl = $table;
     $this->_tbl_key = $key;
     if ($module) {
         $this->_tbl_module = $module;
     } else {
         $this->_tbl_module = $table;
     }
     $this->_tbl_prefix = w2PgetConfig('dbprefix', '');
     $this->_query = new w2p_Database_Query();
 }
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:22,代码来源:BaseObject.class.php


示例7: connect

 public function connect($host = 'localhost', $dbname, $user = 'root', $passwd = '', $persist = false)
 {
     global $ADODB_FETCH_MODE;
     switch (strtolower(trim(w2PgetConfig('dbtype')))) {
         default:
             //mySQL
             if ($persist) {
                 $this->db->PConnect($host, $user, $passwd, $dbname) or die('FATAL ERROR: Connection to database server failed');
             } else {
                 $this->db->Connect($host, $user, $passwd, $dbname) or die('FATAL ERROR: Connection to database server failed');
             }
     }
     $ADODB_FETCH_MODE = ADODB_FETCH_BOTH;
 }
开发者ID:illuminate3,项目名称:web2project,代码行数:14,代码来源:Connection.class.php


示例8: __construct

 /**
  * Constructor
  * @param string The base URL query string to prefix tab links
  * @param string The base path to prefix the include file
  * @param int The active tab
  * @param string Optional javascript method to be used to execute tabs.
  *    Must support 2 arguments, currently active tab, new tab to activate.
  */
 public function __construct($baseHRef = '', $baseInc = '', $active = 0, $javascript = null)
 {
     global $AppUI, $currentTabId, $currentTabName, $m, $a;
     $this->_AppUI = $AppUI;
     $this->currentTabId = $currentTabId;
     $this->currentTabName = $currentTabName;
     $this->m = $m;
     $this->a = $a;
     $this->tabs = array();
     $this->active = $active;
     $this->baseHRef = $baseHRef ? $baseHRef . '&amp;' : '?';
     $this->javascript = $javascript;
     $this->baseInc = $baseInc;
     $this->_uistyle = $this->_AppUI->getPref('UISTYLE') ? $this->_AppUI->getPref('UISTYLE') : w2PgetConfig('host_style');
     if (!$this->_uistyle) {
         $this->_uistyle = 'web2project';
     }
 }
开发者ID:illuminate3,项目名称:web2project,代码行数:26,代码来源:TabBox.class.php


示例9: sendNewPass

function sendNewPass()
{
    global $AppUI;
    $_live_site = w2PgetConfig('base_url');
    $_sitename = w2PgetConfig('company_name');
    // ensure no malicous sql gets past
    $checkusername = trim(w2PgetParam($_POST, 'checkusername', ''));
    $checkusername = db_escape($checkusername);
    $confirmEmail = trim(w2PgetParam($_POST, 'checkemail', ''));
    $confirmEmail = strtolower(db_escape($confirmEmail));
    $q = new DBQuery();
    $q->addTable('users');
    $q->addJoin('contacts', '', 'user_contact = contact_id', 'inner');
    $q->addQuery('user_id');
    $q->addWhere('user_username = \'' . $checkusername . '\'');
    $q->addWhere('LOWER(contact_email) = \'' . $confirmEmail . '\'');
    if (!($user_id = $q->loadResult()) || !$checkusername || !$confirmEmail) {
        $AppUI->setMsg('Invalid username or email.', UI_MSG_ERROR);
        $AppUI->redirect();
    }
    $newpass = makePass();
    $message = $AppUI->_('sendpass0', UI_OUTPUT_RAW) . ' ' . $checkusername . ' ' . $AppUI->_('sendpass1', UI_OUTPUT_RAW) . ' ' . $_live_site . ' ' . $AppUI->_('sendpass2', UI_OUTPUT_RAW) . ' ' . $newpass . ' ' . $AppUI->_('sendpass3', UI_OUTPUT_RAW);
    $subject = $_sitename . ' :: ' . $AppUI->_('sendpass4', UI_OUTPUT_RAW) . ' - ' . $checkusername;
    $m = new Mail();
    // create the mail
    $m->To($confirmEmail);
    $m->Subject($subject);
    $m->Body($message, isset($GLOBALS['locale_char_set']) ? $GLOBALS['locale_char_set'] : '');
    // set the body
    $m->Send();
    // send the mail
    $newpass = md5($newpass);
    $q->addTable('users');
    $q->addUpdate('user_password', $newpass);
    $q->addWhere('user_id=' . $user_id);
    $cur = $q->exec();
    if (!$cur) {
        die('SQL error' . $database->stderr(true));
    } else {
        $AppUI->setMsg('New User Password created and emailed to you');
        $AppUI->redirect();
    }
}
开发者ID:joly,项目名称:web2project,代码行数:43,代码来源:sendpass.php


示例10: calcDuration

function calcDuration($start_date, $start_hour, $start_minute, $end_date, $end_hour, $end_minute, $duration_type)
{
    $year = substr($start_date, 0, 4);
    $month = substr($start_date, 4, 2);
    $day = substr($start_date, 6, 2);
    $startDate = new w2p_Utilities_Date($year . '-' . $month . '-' . $day);
    $startDate->setTime($start_hour, $start_minute);
    $year = substr($end_date, 0, 4);
    $month = substr($end_date, 4, 2);
    $day = substr($end_date, 6, 2);
    $endDate = new w2p_Utilities_Date($year . '-' . $month . '-' . $day);
    $endDate->setTime($end_hour, $end_minute);
    $duration = $startDate->calcDuration($endDate);
    if (intval($duration_type) == 24) {
        $workHours = intval(w2PgetConfig('daily_working_hours'));
        $duration = $duration / $workHours;
    }
    $response = new xajaxResponse();
    $response->assign('task_duration', 'value', $duration);
    return $response;
}
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:21,代码来源:ajax_functions.php


示例11: isset

           	<?php 
    echo '</a>';
    ?>
      	</table>
	</td>
</tr>
<tr id="files" <?php 
    echo isset($view_options[0]['pd_option_view_files']) ? $view_options[0]['pd_option_view_files'] ? 'style="visibility:visible;display:"' : 'style="visibility:collapse;display:none"' : 'style="visibility:visible;display:"';
    ?>
>
	<td colspan="2" class="hilite">
	<?php 
    //Permission check here
    $canViewFiles = $perms->checkModule('files', 'view');
    if ($canViewFiles) {
        require w2PgetConfig('root_dir') . '/modules/projectdesigner/vw_files.php';
    } else {
        echo $AppUI->_('You do not have permission to view files');
    }
    ?>
	</td>
</tr>
</table>
<div style="display:none;">
<table class="tbl">
<tr><td id="td_sample">&nbsp;</td></tr>
</table>
</div>
<script language="javascript">
var original_bgc = getStyle('td_sample', 'background-color', 'backgroundColor');
</script>
开发者ID:joly,项目名称:web2project,代码行数:31,代码来源:index.php


示例12: foreach

$titleBlock->addCrumb('?m=system&a=addeditpref', 'default user preferences');
$titleBlock->show();
// prepare the automated form fields based on db system configuration data
$output = null;
$last_group = '';
foreach ($rs as $c) {
    $tooltip = $AppUI->_($c['config_name'] . '_tooltip');
    // extraparse the checkboxes and the select lists
    $extra = '';
    $value = '';
    switch ($c['config_type']) {
        case 'select':
            // Build the select list.
            if ($c['config_name'] == 'system_timezone') {
                $timezones = w2PgetSysVal('Timezones');
                $entry = arraySelect($timezones, 'w2Pcfg[system_timezone]', 'class=text size=1', w2PgetConfig('system_timezone'), true);
            } else {
                $entry = '<select class="text" name="w2Pcfg[' . $c['config_name'] . ']">';
                // Find the detail relating to this entry.
                $children = $w2Pcfg->getChildren($c['config_id']);
                foreach ($children as $child) {
                    $entry .= '<option value="' . $child['config_list_name'] . '"';
                    if ($child['config_list_name'] == $c['config_value']) {
                        $entry .= ' selected="selected"';
                    }
                    $entry .= '>' . $AppUI->_($child['config_list_name'] . '_item_title') . '</option>';
                }
                $entry .= '</select>';
            }
            break;
        case 'checkbox':
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:systemconfig.php


示例13: w2PgetConfig

</table>
<table align="center" border="0" width="700" cellpadding="0" cellspacing="0" class="">
	<tr>
		<td style="padding-top:10px;padding-bottom:10px;" align="left" valign="top" class="txt"><h1>New Signup to web2Project!</h1>
		Please enter the info below to create a new signup.</td>
	</tr>
</table>
<form name="editFrm" action="./do_user_aed.php" method="post" accept-charset="utf-8">
	<input type="hidden" name="user_id" value="0" />
	<input type="hidden" name="contact_id" value="0" />
	<input type="hidden" name="username_min_len" value="<?php 
echo w2PgetConfig('username_min_len');
?>
)" />
	<input type="hidden" name="password_min_len" value="<?php 
echo w2PgetConfig('password_min_len');
?>
)" />
	<input type="hidden" name="cid" value="<?php 
echo $cid;
?>
" />

    <table style="border-style:none;" align="center" border="0" width="700" cellpadding="0" cellspacing="0" class="std">
		<tr><td colspan="5"><?php 
echo styleRenderBoxTop();
?>
</td></tr>
		<tr>
            <td align="right" width="230">* <?php 
echo $AppUI->_('Login Name');
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:createuser.php


示例14: w2PgetUsersHashList

 $user_list = w2PgetUsersHashList();
 if ($log_userfilter != 0) {
     $user_list = array($log_userfilter => $user_list[$log_userfilter]);
 }
 $ss = "'" . $start_date->format(FMT_DATETIME_MYSQL) . "'";
 $se = "'" . $end_date->format(FMT_DATETIME_MYSQL) . "'";
 $and = false;
 $where = false;
 $q = new w2p_Database_Query();
 $q->addTable('tasks', 't');
 $q->addQuery('t.*');
 $q->addJoin('projects', '', 'projects.project_id = task_project', 'inner');
 $q->addJoin('project_departments', '', 'project_departments.project_id = projects.project_id');
 $q->addJoin('departments', '', 'department_id = dept_id');
 $q->addWhere('project_active = 1');
 if (($template_status = w2PgetConfig('template_projects_status_id')) != '') {
     $q->addWhere('project_status <> ' . (int) $template_status);
 }
 if ($use_period) {
     $q->addWhere('( (task_start_date >= ' . $ss . ' AND task_start_date <= ' . $se . ') OR ' . '(task_end_date <= ' . $se . ' AND task_end_date >= ' . $ss . ') )');
 }
 if ($project_id != 0) {
     $q->addWhere('task_project=' . $project_id);
 }
 $proj = new CProject();
 $obj = new CTask();
 $allowedProjects = $proj->getAllowedSQL($AppUI->user_id, 'task_project');
 $allowedTasks = $obj->getAllowedSQL($AppUI->user_id);
 if (count($allowedProjects)) {
     $q->addWhere(implode(' AND ', $allowedProjects));
 }
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:tasksperuser.php


示例15: array

        $q->clear();
        $q->addQuery('ut.user_id,	u.user_username');
        $q->addQuery('ut.perc_assignment');
        $q->addQuery('CONCAT(contact_first_name, \' \',contact_last_name) AS assignee, contact_email');
        $q->addTable('user_tasks', 'ut');
        $q->addJoin('users', 'u', 'u.user_id = ut.user_id', 'inner');
        $q->addJoin('contacts', 'c', 'u.user_contact = c.contact_id', 'inner');
        $q->addWhere('ut.task_id = ' . (int) $row['task_id']);
        $q->addOrder('perc_assignment desc, contact_first_name, contact_last_name');
        $assigned_users = array();
        $row['task_assigned_users'] = $q->loadList();
        //pull the final task row into array
        $projects[$row['task_project']]['tasks'][] = $row;
    }
}
$showEditCheckbox = isset($canEdit) && $canEdit && w2PgetConfig('direct_edit_assignment') ? true : false;
global $history_active;
$history_active = !empty($mods['history']) && canView('history');
?>

<script language="javascript" type="text/javascript">
function toggle_users(id){
  var element = document.getElementById(id);
  element.style.display = (element.style.display == '' || element.style.display == "none") ? "inline" : "none";
}

<?php 
// security improvement:
// some javascript functions may not appear on client side in case of user not having write permissions
// else users would be able to arbitrarily run 'bad' functions
if (isset($canEdit) && $canEdit && $w2Pconfig['direct_edit_assignment']) {
开发者ID:eureka2,项目名称:web2project,代码行数:31,代码来源:tasks.php


示例16: getConnection

 /**
  * Return database connection for tests
  */
 protected function getConnection()
 {
     $pdo = new PDO(w2PgetConfig('dbtype') . ':host=' . w2PgetConfig('dbhost') . ';dbname=' . w2PgetConfig('dbname'), w2PgetConfig('dbuser'), w2PgetConfig('dbpass'));
     return $this->createDefaultDBConnection($pdo, w2PgetConfig('dbname'));
 }
开发者ID:eureka2,项目名称:web2project,代码行数:8,代码来源:tasks.test.php


示例17: buildHeaderNavigation

/**
 * Rebuilt this as a class method to override the basic layout, etc information.
 *   While this is overkill for the core system, it's absolutely necessary for
 *   good custom theming.
 *
 * @param type $AppUI
 * @param type $rootTag
 * @param type $innerTag
 * @param type $dividingToken
 * @param type $m
 * @return type
 */
function buildHeaderNavigation($AppUI, $rootTag = '', $innerTag = '', $dividingToken = '', $m = '')
{
    trigger_error("The buildHeaderNavigation function has been deprecated in v3.1 and will be removed by v5.0. Please use w2p_Theme_Base->buildHeaderNavigation() instead.", E_USER_NOTICE);
    $uistyle = $AppUI->getPref('UISTYLE') ? $AppUI->getPref('UISTYLE') : w2PgetConfig('host_style');
    $style = 'style_' . str_replace('-', '', $uistyle);
    $theme = new $style($AppUI, $m);
    return $theme->buildHeaderNavigation($rootTag, $innerTag, $dividingToken);
}
开发者ID:illuminate3,项目名称:web2project,代码行数:20,代码来源:deprecated_functions.php


示例18: die

<?php

/* $Id$ $URL$ */
if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<title><?php 
echo @w2PgetConfig('page_title');
?>
</title>
	<meta http-equiv="Content-Type" content="text/html;charset=<?php 
echo isset($locale_char_set) ? $locale_char_set : 'UTF-8';
?>
" />
	<title><?php 
echo $w2Pconfig['company_name'];
?>
 :: web2Project Lost Password Recovery</title>
	<meta http-equiv="Pragma" content="no-cache" />
	<meta name="Version" content="<?php 
echo $AppUI->getVersion();
?>
" />
	<link rel="stylesheet" type="text/css" href="./style/<?php 
echo $uistyle;
?>
开发者ID:joly,项目名称:web2project,代码行数:31,代码来源:lostpass.php


示例19: indexStrings

 public function indexStrings()
 {
     global $AppUI, $w2Pconfig;
     $nwords_indexed = 0;
     /* Workaround for indexing large files:
      ** Based on the value defined in config data,
      ** files with file_size greater than specified limit
      ** are not indexed for searching.
      ** Negative value :<=> no filesize limit
      */
     $index_max_file_size = w2PgetConfig('index_max_file_size', 0);
     if ($index_max_file_size < 0 || $obj->file_size <= $index_max_file_size * 1024) {
         // get the parser application
         $parser = $w2Pconfig['parser_' . $this->file_type];
         if (!$parser) {
             $parser = $w2Pconfig['parser_default'];
         }
         if (!$parser) {
             return false;
         }
         // buffer the file
         $this->_filepath = W2P_BASE_DIR . '/files/' . $this->file_project . '/' . $this->file_real_filename;
         $fp = fopen($this->_filepath, 'rb');
         $x = fread($fp, $this->file_size);
         fclose($fp);
         // parse it
         $parser = $parser . ' ' . $this->_filepath;
         $pos = strpos($parser, '/pdf');
         if (false !== $pos) {
             $x = `{$parser} -`;
         } else {
             $x = `{$parser}`;
         }
         // if nothing, return
         if (strlen($x) < 1) {
             return 0;
         }
         // remove punctuation and parse the strings
         $x = str_replace(array('.', ',', '!', '@', '(', ')'), ' ', $x);
         $warr = explode(' ', $x);
         $wordarr = array();
         $nwords = count($warr);
         for ($x = 0; $x < $nwords; $x++) {
             $newword = $warr[$x];
             if (!preg_match('[[:punct:]]', $newword) && mb_strlen(mb_trim($newword)) > 2 && !preg_match('[[:digit:]]', $newword)) {
                 $wordarr[$newword] = $x;
             }
         }
         // filter out common strings
         $ignore = w2PgetSysVal('FileIndexIgnoreWords');
         $ignore = str_replace(' ,', ',', $ignore);
         $ignore = str_replace(', ', ',', $ignore);
         $ignore = explode(',', $ignore);
         foreach ($ignore as $w) {
             unset($wordarr[$w]);
         }
         $nwords_indexed = count($wordarr);
         // insert the strings into the table
         while (list($key, $val) = each($wordarr)) {
             $q = new DBQuery();
             $q->addTable('files_index');
             $q->addReplace('file_id', $this->file_id);
             $q->addReplace('word', $key);
             $q->addReplace('word_placement', $val);
             $q->exec();
             $q->clear();
         }
     }
     return $nwords_indexed;
 }
开发者ID:joly,项目名称:web2project,代码行数:70,代码来源:files.class.php


示例20: getTaskList

 public function getTaskList($userId, $days = 30)
 {
     /*
      * This list of fields - id, name, description, startDate, endDate,
      * updatedDate - are named specifically for the iCal creation.
      * If you change them, it's probably going to break.  So don't do that.
      */
     $q = new w2p_Database_Query();
     $q->addQuery('t.task_id as id');
     $q->addQuery('task_name as name');
     $q->addQuery('task_description as description');
     $q->addQuery('task_start_date as startDate');
     $q->addQuery('task_end_date as endDate');
     $q->addQuery('task_updated as updatedDate');
     $q->addQuery('CONCAT(\'' . W2P_BASE_URL . '/index.php?m=tasks&a=view&task_id=' . '\', t.task_id) as url');
     $q->addQuery('p.project_id, p.project_name');
     $q->addTable('tasks', 't');
     $q->addWhere('(task_start_date < ' . $q->dbfnDateAdd($q->dbfnNow(), $days, 'DAY') . ' OR task_end_date < ' . $q->dbfnDateAdd($q->dbfnNow(), $days, 'DAY') . ')');
     $q->addWhere('task_percent_complete < 100');
     $q->addWhere('task_dynamic <> 1');
     $q->innerJoin('user_tasks', 'ut', 'ut.task_id = t.task_id');
     $q->addWhere('ut.user_id = ' . $userId);
     $q->innerJoin('projects', 'p', 'p.project_id = t.task_project');
     $q->addWhere('project_active > 0');
     if (($template_status = w2PgetConfig('template_projects_status_id')) != '') {
         $q->addWhere('project_status <> ' . $template_status);
     }
     $q->addOrder('task_start_date, task_end_date');
     return $q->loadList();
 }
开发者ID:eureka2,项目名称:web2project,代码行数:30,代码来源:tasks.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP w2PgetParam函数代码示例发布时间:2022-05-23
下一篇:
PHP w2PformSafe函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap