本文整理汇总了PHP中getTableList函数的典型用法代码示例。如果您正苦于以下问题:PHP getTableList函数的具体用法?PHP getTableList怎么用?PHP getTableList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getTableList函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: symptoms_form
//.........这里部分代码省略.........
$templateCode = str_replace('<%%UPDATE_BUTTON%%>', '<input type="image" src="update.gif" vspace="1" name="update" alt="' . $Translation['update record'] . '" onclick="return validateData();">', $templateCode);
} else {
$templateCode = str_replace('<%%UPDATE_BUTTON%%>', '', $templateCode);
// set records to read only if user can't insert new records
if (!$arrPerm[1]) {
$jsReadOnly .= "\n\n\tif(document.getElementsByName('id').length){ document.getElementsByName('id')[0].readOnly=true; }\n";
$jsReadOnly .= "\n\n\tif(document.getElementsByName('name').length){ document.getElementsByName('name')[0].readOnly=true; }\n";
$noUploads = true;
}
}
if ($arrPerm[4] == 1 && $ownerMemberID == getLoggedMemberID() || $arrPerm[4] == 2 && $ownerGroupID == getLoggedGroupID() || $arrPerm[4] == 3) {
// allow delete?
$templateCode = str_replace('<%%DELETE_BUTTON%%>', '<input type="image" src="delete.gif" vspace="1" name="delete" alt="' . $Translation['delete record'] . '" onClick="return confirm(\'' . $Translation['are you sure?'] . '\');">', $templateCode);
} else {
$templateCode = str_replace('<%%DELETE_BUTTON%%>', '', $templateCode);
}
$templateCode = str_replace('<%%DESELECT_BUTTON%%>', "<input type=image src=deselect.gif vspace=1 name=deselect alt=\"" . $Translation['deselect record'] . "\" onclick=\"document.myform.reset(); return true;\">", $templateCode);
} else {
$templateCode = str_replace('<%%UPDATE_BUTTON%%>', '', $templateCode);
$templateCode = str_replace('<%%DELETE_BUTTON%%>', '', $templateCode);
$templateCode = str_replace('<%%DESELECT_BUTTON%%>', $ShowCancel ? "<input type=image src=cancel.gif vspace=1 name=deselect alt=\"" . $Translation['deselect record'] . "\" onclick=\"document.myform.reset(); return true;\">" : '', $templateCode);
}
// process combos
// process foreign key links
if ($selected_id) {
}
// process images
$templateCode = str_replace('<%%UPLOADFILE(id)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(name)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(description)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(comments)%%>', '', $templateCode);
// process values
if ($selected_id) {
$templateCode = str_replace('<%%VALUE(id)%%>', htmlspecialchars($row['id'], ENT_QUOTES), $templateCode);
$templateCode = str_replace('<%%VALUE(name)%%>', htmlspecialchars($row['name'], ENT_QUOTES), $templateCode);
if ($AllowUpdate || $AllowInsert) {
$templateCode = str_replace('<%%HTMLAREA(description)%%>', '<textarea name="description" id="description" cols="50" rows="5" class="TextBox">' . htmlspecialchars($row['description'], ENT_QUOTES) . '</textarea>', $templateCode);
} else {
$templateCode = str_replace('<%%HTMLAREA(description)%%>', $row['description'], $templateCode);
}
$templateCode = str_replace('<%%VALUE(description)%%>', $row['description'], $templateCode);
if ($AllowUpdate || $AllowInsert) {
$templateCode = str_replace('<%%HTMLAREA(comments)%%>', '<textarea name="comments" id="comments" cols="50" rows="5" class="TextBox">' . htmlspecialchars($row['comments'], ENT_QUOTES) . '</textarea>', $templateCode);
} else {
$templateCode = str_replace('<%%HTMLAREA(comments)%%>', $row['comments'], $templateCode);
}
$templateCode = str_replace('<%%VALUE(comments)%%>', $row['comments'], $templateCode);
} else {
$templateCode = str_replace('<%%VALUE(id)%%>', '', $templateCode);
$templateCode = str_replace('<%%VALUE(name)%%>', '', $templateCode);
$templateCode = str_replace('<%%HTMLAREA(description)%%>', '<textarea name="description" id="description" cols="50" rows="5" class="TextBox"></textarea>', $templateCode);
$templateCode = str_replace('<%%HTMLAREA(comments)%%>', '<textarea name="comments" id="comments" cols="50" rows="5" class="TextBox"></textarea>', $templateCode);
}
// process translations
foreach ($Translation as $symbol => $trans) {
$templateCode = str_replace("<%%TRANSLATION({$symbol})%%>", $trans, $templateCode);
}
// clear scrap
$templateCode = str_replace('<%%', '<!--', $templateCode);
$templateCode = str_replace('%%>', '-->', $templateCode);
// hide links to inaccessible tables
if ($_POST['dvprint_x'] == '') {
$templateCode .= "\n\n<script>\n";
$arrTables = getTableList();
foreach ($arrTables as $name => $caption) {
$templateCode .= "\tif(document.getElementById('" . $name . "_link')!=undefined){\n";
$templateCode .= "\t\tdocument.getElementById('" . $name . "_link').style.visibility='visible';\n";
$templateCode .= "\t}\n";
for ($i = 1; $i < 10; $i++) {
$templateCode .= "\tif(document.getElementById('" . $name . "_plink{$i}')!=undefined){\n";
$templateCode .= "\t\tdocument.getElementById('" . $name . "_plink{$i}').style.visibility='visible';\n";
$templateCode .= "\t}\n";
}
}
$templateCode .= $jsReadOnly;
if (!$selected_id) {
}
$templateCode .= "\n\tfunction validateData(){";
$templateCode .= "\n\t\tif(\$F('name')==''){ alert('" . addslashes($Translation['error:']) . ' "Name": ' . addslashes($Translation['field not null']) . "'); \$('name').focus(); return false; }";
$templateCode .= "\n\t\treturn true;";
$templateCode .= "\n\t}";
$templateCode .= "\n</script>\n";
}
// ajaxed auto-fill fields
$templateCode .= "<script>";
$templateCode .= "document.observe('dom:loaded', function() {";
$templateCode .= "});";
$templateCode .= "</script>";
// handle enforced parent values for read-only lookup fields
// don't include blank images in lightbox gallery
$templateCode = preg_replace('/blank.gif" rel="lightbox\\[.*?\\]"/', 'blank.gif"', $templateCode);
// don't display empty email links
$templateCode = preg_replace('/<a .*?href="mailto:".*?<\\/a>/', '', $templateCode);
// hook: symptoms_dv
if (function_exists('symptoms_dv')) {
$args = array();
symptoms_dv($selected_id ? $selected_id : FALSE, getMemberInfo(), $templateCode, $args);
}
return $templateCode;
}
开发者ID:bigprof,项目名称:Symptoms-and-diseases-database,代码行数:101,代码来源:symptoms_dml.php
示例2: NavMenus
function NavMenus()
{
global $Translation;
$t = time();
$menu = "<select name=nav_menu onChange='window.location=document.myform.nav_menu.options[document.myform.nav_menu.selectedIndex].value;'>";
$menu .= "<option value='#' class=SelectedOption style='color:black;'>" . $Translation["select a table"] . "</option>";
$menu .= "<option value='index.php' class=SelectedOption style='color:black;'>" . $Translation["homepage"] . "</option>";
if (getLoggedAdmin()) {
$menu .= "<option value='admin/' class=SelectedOption style='color:red;'>" . $Translation['admin area'] . "</option>";
}
$arrTables = getTableList();
if (is_array($arrTables)) {
foreach ($arrTables as $tn => $tc) {
$tChk = array_search($tn, array());
if ($tChk !== false && $tChk !== null) {
$searchFirst = '&Filter_x=1';
} else {
$searchFirst = '';
}
$menu .= "<option value='" . $tn . "_view.php?t={$t}{$searchFirst}' class=SelectedOption>{$tc['0']}</option>";
}
}
$menu .= "</select>";
return $menu;
}
开发者ID:bigprof,项目名称:Symptoms-and-diseases-database,代码行数:25,代码来源:lib.php
示例3: getListModels
/**
* データソースを指定してモデルリストを取得する
*
* @param string $configKeyName データソース名
* @return array
*/
public function getListModels($type = 'core')
{
$db = ConnectionManager::getDataSource('default');
$listSources = $db->listSources();
if (!$listSources) {
return array();
}
$tableList = getTableList();
$sources = array();
foreach ($listSources as $source) {
if (in_array($source, $tableList[$type])) {
$sources[] = $source;
}
}
return $sources;
}
开发者ID:baserproject,项目名称:basercms,代码行数:22,代码来源:Tool.php
示例4: getHandleTableList
function getHandleTableList()
{
$s = '';
$lableStr = '';
$lableStr = '表列表[' . @$_REQUEST['mdbpath'] . ']';
if ($GLOBALS['WEB_CACHEContent'] == '') {
$GLOBALS['WEB_CACHEContent'] = getFText($GLOBALS['WEB_CACHEFile']);
}
$s = getConfigContentBlock($GLOBALS['WEB_CACHEContent'], '#' . $lableStr . '#');
if ($s == '') {
$s = lCase(getTableList());
$s = '|' . replace($s, vbCrlf(), '|') . '|';
$GLOBALS['WEB_CACHEContent'] = setConfigFileBlock($GLOBALS['WEB_CACHEFile'], $s, '#' . $lableStr . '#');
if ($GLOBALS['isCacheTip'] == true) {
aspEcho('缓冲', $lableStr);
}
}
$getHandleTableList = $s;
return @$getHandleTableList;
}
开发者ID:313801120,项目名称:AspPhpCms,代码行数:20,代码来源:admin_function.php
示例5: residence_and_rental_history_form
//.........这里部分代码省略.........
}
// process images
$templateCode = str_replace('<%%UPLOADFILE(id)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(tenant)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(address)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(landlord_or_manager_name)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(landlord_or_manager_phone)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(monthly_rent)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(duration_of_residency_from)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(to)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(reason_for_leaving)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(notes)%%>', '', $templateCode);
// process values
if ($selected_id) {
$templateCode = str_replace('<%%VALUE(id)%%>', htmlspecialchars($row['id'], ENT_QUOTES), $templateCode);
$templateCode = str_replace('<%%URLVALUE(id)%%>', urlencode($urow['id']), $templateCode);
$templateCode = str_replace('<%%VALUE(tenant)%%>', htmlspecialchars($row['tenant'], ENT_QUOTES), $templateCode);
$templateCode = str_replace('<%%URLVALUE(tenant)%%>', urlencode($urow['tenant']), $templateCode);
$templateCode = str_replace('<%%VALUE(address)%%>', htmlspecialchars($row['address'], ENT_QUOTES), $templateCode);
$templateCode = str_replace('<%%URLVALUE(address)%%>', urlencode($urow['address']), $templateCode);
$templateCode = str_replace('<%%VALUE(landlord_or_manager_name)%%>', htmlspecialchars($row['landlord_or_manager_name'], ENT_QUOTES), $templateCode);
$templateCode = str_replace('<%%URLVALUE(landlord_or_manager_name)%%>', urlencode($urow['landlord_or_manager_name']), $templateCode);
$templateCode = str_replace('<%%VALUE(landlord_or_manager_phone)%%>', htmlspecialchars($row['landlord_or_manager_phone'], ENT_QUOTES), $templateCode);
$templateCode = str_replace('<%%URLVALUE(landlord_or_manager_phone)%%>', urlencode($urow['landlord_or_manager_phone']), $templateCode);
$templateCode = str_replace('<%%VALUE(monthly_rent)%%>', htmlspecialchars($row['monthly_rent'], ENT_QUOTES), $templateCode);
$templateCode = str_replace('<%%URLVALUE(monthly_rent)%%>', urlencode($urow['monthly_rent']), $templateCode);
$templateCode = str_replace('<%%VALUE(duration_of_residency_from)%%>', @date('m/d/Y', @strtotime(htmlspecialchars($row['duration_of_residency_from'], ENT_QUOTES))), $templateCode);
$templateCode = str_replace('<%%URLVALUE(duration_of_residency_from)%%>', urlencode(@date('m/d/Y', @strtotime(htmlspecialchars($urow['duration_of_residency_from'], ENT_QUOTES)))), $templateCode);
$templateCode = str_replace('<%%VALUE(to)%%>', @date('m/d/Y', @strtotime(htmlspecialchars($row['to'], ENT_QUOTES))), $templateCode);
$templateCode = str_replace('<%%URLVALUE(to)%%>', urlencode(@date('m/d/Y', @strtotime(htmlspecialchars($urow['to'], ENT_QUOTES)))), $templateCode);
$templateCode = str_replace('<%%VALUE(reason_for_leaving)%%>', htmlspecialchars($row['reason_for_leaving'], ENT_QUOTES), $templateCode);
$templateCode = str_replace('<%%URLVALUE(reason_for_leaving)%%>', urlencode($urow['reason_for_leaving']), $templateCode);
if ($AllowUpdate || $AllowInsert) {
$templateCode = str_replace('<%%HTMLAREA(notes)%%>', '<textarea name="notes" id="notes" rows="5">' . htmlspecialchars($row['notes'], ENT_QUOTES) . '</textarea>', $templateCode);
} else {
$templateCode = str_replace('<%%HTMLAREA(notes)%%>', $row['notes'], $templateCode);
}
$templateCode = str_replace('<%%VALUE(notes)%%>', nl2br($row['notes']), $templateCode);
$templateCode = str_replace('<%%URLVALUE(notes)%%>', urlencode($urow['notes']), $templateCode);
} else {
$templateCode = str_replace('<%%VALUE(id)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(id)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(tenant)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(tenant)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(address)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(address)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(landlord_or_manager_name)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(landlord_or_manager_name)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(landlord_or_manager_phone)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(landlord_or_manager_phone)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(monthly_rent)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(monthly_rent)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(duration_of_residency_from)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(duration_of_residency_from)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(to)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(to)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(reason_for_leaving)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(reason_for_leaving)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%HTMLAREA(notes)%%>', '<textarea name="notes" id="notes" rows="5"></textarea>', $templateCode);
}
// process translations
foreach ($Translation as $symbol => $trans) {
$templateCode = str_replace("<%%TRANSLATION({$symbol})%%>", $trans, $templateCode);
}
// clear scrap
$templateCode = str_replace('<%%', '<!-- ', $templateCode);
$templateCode = str_replace('%%>', ' -->', $templateCode);
// hide links to inaccessible tables
if ($_POST['dvprint_x'] == '') {
$templateCode .= "\n\n<script>\$j(function(){\n";
$arrTables = getTableList();
foreach ($arrTables as $name => $caption) {
$templateCode .= "\t\$j('#{$name}_link').removeClass('hidden');\n";
$templateCode .= "\t\$j('#xs_{$name}_link').removeClass('hidden');\n";
$templateCode .= "\t\$j('[id^=\"{$name}_plink\"]').removeClass('hidden');\n";
}
$templateCode .= $jsReadOnly;
$templateCode .= $jsEditable;
if (!$selected_id) {
}
$templateCode .= "\n});</script>\n";
}
// ajaxed auto-fill fields
$templateCode .= '<script>';
$templateCode .= '$j(function() {';
$templateCode .= "});";
$templateCode .= "</script>";
$templateCode .= $lookups;
// handle enforced parent values for read-only lookup fields
// don't include blank images in lightbox gallery
$templateCode = preg_replace('/blank.gif" rel="lightbox\\[.*?\\]"/', 'blank.gif"', $templateCode);
// don't display empty email links
$templateCode = preg_replace('/<a .*?href="mailto:".*?<\\/a>/', '', $templateCode);
// hook: residence_and_rental_history_dv
if (function_exists('residence_and_rental_history_dv')) {
$args = array();
residence_and_rental_history_dv($selected_id ? $selected_id : FALSE, getMemberInfo(), $templateCode, $args);
}
return $templateCode;
}
开发者ID:vishwanathhsinhaa,项目名称:tieuthuong-org,代码行数:101,代码来源:residence_and_rental_history_dml.php
示例6: dirname
<?php
$currDir = dirname(__FILE__);
require "{$currDir}/incCommon.php";
// tables list
$tables = getTableList();
// ensure that a memberID is provided
if ($_GET['memberID'] != '') {
$memberID = makeSafe(strtolower($_GET['memberID']));
} elseif ($_POST['memberID'] != '') {
$memberID = makeSafe(strtolower($_POST['memberID']));
} else {
// error in request. redirect to members page.
redirect('admin/pageViewMembers.php');
}
// validate memberID exists and is not guest and is not admin
$anonymousMember = strtolower($adminConfig['anonymousMember']);
$anonymousGroup = $adminConfig['anonymousGroup'];
$anonGroupID = sqlValue("select groupID from membership_groups where lcase(name)='" . strtolower(makeSafe($anonymousGroup)) . "'");
$adminGroupID = sqlValue("select groupID from membership_groups where name='Admins'");
$groupID = sqlValue("select groupID from membership_users where lcase(memberID)='{$memberID}'");
$group = sqlValue("select name from membership_groups where groupID='{$groupID}'");
if ($groupID == $anonGroupID || $memberID == $anonymousMember || !$groupID || $groupID == $adminGroupID || $memberID == $adminConfig['adminUsername']) {
// error in request. redirect to members page.
redirect('admin/pageViewMembers.php');
}
// request to save changes?
if ($_POST['saveChanges'] != '') {
// validate data
foreach ($tables as $t => $tc) {
eval(" \n\t\t\t\t\${$t}_insert=checkPermissionVal('{$t}_insert');\n\t\t\t\t\${$t}_view=checkPermissionVal('{$t}_view');\n\t\t\t\t\${$t}_edit=checkPermissionVal('{$t}_edit');\n\t\t\t\t\${$t}_delete=checkPermissionVal('{$t}_delete');\n\t\t\t");
开发者ID:WebxOne,项目名称:swldbav0.6,代码行数:31,代码来源:pageEditMemberPermissions.php
示例7: units_form
//.........这里部分代码省略.........
$templateCode = str_replace('<%%URLVALUE(size)%%>', urlencode($urow['size']), $templateCode);
$templateCode = str_replace('<%%VALUE(rooms)%%>', htmlspecialchars($row['rooms'], ENT_QUOTES), $templateCode);
$templateCode = str_replace('<%%URLVALUE(rooms)%%>', urlencode($urow['rooms']), $templateCode);
$templateCode = str_replace('<%%VALUE(bathroom)%%>', htmlspecialchars($row['bathroom'], ENT_QUOTES), $templateCode);
$templateCode = str_replace('<%%URLVALUE(bathroom)%%>', urlencode($urow['bathroom']), $templateCode);
$templateCode = str_replace('<%%VALUE(features)%%>', htmlspecialchars($row['features'], ENT_QUOTES), $templateCode);
$templateCode = str_replace('<%%URLVALUE(features)%%>', urlencode($urow['features']), $templateCode);
$templateCode = str_replace('<%%VALUE(market_rent)%%>', htmlspecialchars($row['market_rent'], ENT_QUOTES), $templateCode);
$templateCode = str_replace('<%%URLVALUE(market_rent)%%>', urlencode($urow['market_rent']), $templateCode);
$templateCode = str_replace('<%%VALUE(rental_amount)%%>', htmlspecialchars($row['rental_amount'], ENT_QUOTES), $templateCode);
$templateCode = str_replace('<%%URLVALUE(rental_amount)%%>', urlencode($urow['rental_amount']), $templateCode);
$templateCode = str_replace('<%%VALUE(deposit_amount)%%>', htmlspecialchars($row['deposit_amount'], ENT_QUOTES), $templateCode);
$templateCode = str_replace('<%%URLVALUE(deposit_amount)%%>', urlencode($urow['deposit_amount']), $templateCode);
if ($AllowUpdate || $AllowInsert) {
$templateCode = str_replace('<%%HTMLAREA(description)%%>', '<textarea name="description" id="description" rows="5">' . htmlspecialchars($row['description'], ENT_QUOTES) . '</textarea>', $templateCode);
} else {
$templateCode = str_replace('<%%HTMLAREA(description)%%>', $row['description'], $templateCode);
}
$templateCode = str_replace('<%%VALUE(description)%%>', nl2br($row['description']), $templateCode);
$templateCode = str_replace('<%%URLVALUE(description)%%>', urlencode($urow['description']), $templateCode);
} else {
$templateCode = str_replace('<%%VALUE(id)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(id)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(property)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(property)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(unit_number)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(unit_number)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(photo)%%>', 'blank.gif', $templateCode);
$templateCode = str_replace('<%%VALUE(status)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(status)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(size)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(size)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(rooms)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(rooms)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(bathroom)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(bathroom)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(features)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(features)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(market_rent)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(market_rent)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(rental_amount)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(rental_amount)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(deposit_amount)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(deposit_amount)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%HTMLAREA(description)%%>', '<textarea name="description" id="description" rows="5"></textarea>', $templateCode);
}
// process translations
foreach ($Translation as $symbol => $trans) {
$templateCode = str_replace("<%%TRANSLATION({$symbol})%%>", $trans, $templateCode);
}
// clear scrap
$templateCode = str_replace('<%%', '<!-- ', $templateCode);
$templateCode = str_replace('%%>', ' -->', $templateCode);
// hide links to inaccessible tables
if ($_POST['dvprint_x'] == '') {
$templateCode .= "\n\n<script>\$j(function(){\n";
$arrTables = getTableList();
foreach ($arrTables as $name => $caption) {
$templateCode .= "\t\$j('#{$name}_link').removeClass('hidden');\n";
$templateCode .= "\t\$j('#xs_{$name}_link').removeClass('hidden');\n";
$templateCode .= "\t\$j('[id^=\"{$name}_plink\"]').removeClass('hidden');\n";
}
$templateCode .= $jsReadOnly;
$templateCode .= $jsEditable;
if (!$selected_id) {
}
$templateCode .= "\n});</script>\n";
}
// ajaxed auto-fill fields
$templateCode .= '<script>';
$templateCode .= '$j(function() {';
$templateCode .= "\tproperty_update_autofills{$rnd1} = function(){\n";
$templateCode .= "\t\tnew Ajax.Request(\n";
if ($dvprint) {
$templateCode .= "\t\t\t'units_autofill.php?rnd1={$rnd1}&mfk=property&id='+encodeURIComponent('" . addslashes($row['property']) . "'),\n";
$templateCode .= "\t\t\t{encoding: 'UTF-8', method: 'get'}\n";
} else {
$templateCode .= "\t\t\t'units_autofill.php?rnd1={$rnd1}&mfk=property&id=' + encodeURIComponent(current_property{$rnd1}.value),\n";
$templateCode .= "\t\t\t{encoding: 'UTF-8', method: 'get', onCreate: function(){ \$('property{$rnd1}').disable(); \$('propertyLoading').innerHTML='<img src=loading.gif align=top>'; }, onComplete: function(){" . ($arrPerm[1] || ($arrPerm[3] == 1 && $ownerMemberID == getLoggedMemberID() || $arrPerm[3] == 2 && $ownerGroupID == getLoggedGroupID() || $arrPerm[3] == 3) ? "\$('property{$rnd1}').enable(); " : "\$('property{$rnd1}').disable(); ") . "\$('propertyLoading').innerHTML='';}}\n";
}
$templateCode .= "\t\t);\n";
$templateCode .= "\t};\n";
if (!$dvprint) {
$templateCode .= "\tif(\$('property_caption') != undefined) \$('property_caption').onchange=property_update_autofills{$rnd1};\n";
}
$templateCode .= "});";
$templateCode .= "</script>";
$templateCode .= $lookups;
// handle enforced parent values for read-only lookup fields
// don't include blank images in lightbox gallery
$templateCode = preg_replace('/blank.gif" rel="lightbox\\[.*?\\]"/', 'blank.gif"', $templateCode);
// don't display empty email links
$templateCode = preg_replace('/<a .*?href="mailto:".*?<\\/a>/', '', $templateCode);
// hook: units_dv
if (function_exists('units_dv')) {
$args = array();
units_dv($selected_id ? $selected_id : FALSE, getMemberInfo(), $templateCode, $args);
}
return $templateCode;
}
开发者ID:vishwanathhsinhaa,项目名称:tieuthuong-org,代码行数:101,代码来源:units_dml.php
示例8:
</label>
</div>
<div class="row">
<div class="col-sm-offset-3 col-sm-6">
<button name="signIn" type="submit" id="submit" value="signIn" class="btn btn-primary btn-lg btn-block"><?php
echo $Translation['sign in'];
?>
</button>
</div>
</div>
</form>
</div>
<?php
if (is_array(getTableList()) && count(getTableList())) {
/* if anon. users can see any tables ... */
?>
<div class="panel-footer">
<?php
echo $Translation['browse as guest'];
?>
</div>
<?php
}
?>
</div>
</div>
</div>
开发者ID:TokaMElTorkey,项目名称:northwind,代码行数:30,代码来源:login.php
示例9: iconv
$results_per_page = 50;
$id = false;
if (isset($_REQUEST['id'])) {
$id = iconv('UTF-8', datalist_db_encoding, $_REQUEST['id']);
}
$search_term = false;
if (isset($_REQUEST['s'])) {
$search_term = iconv('UTF-8', datalist_db_encoding, $_REQUEST['s']);
}
$page = intval($_REQUEST['p']);
if ($page < 1) {
$page = 1;
}
$skip = $results_per_page * ($page - 1);
$table_name = $_REQUEST['t'];
if (!in_array($table_name, array_keys(getTableList()))) {
/* invalid table */
echo '{"results":[{"id":"","text":"Invalid table"}],"more":false,"elapsed":0}';
exit;
}
/* if id is provided, get owner */
$owner = false;
if ($id) {
$owner = sqlValue("select memberID from membership_userrecords where tableName='{$table_name}' and pkValue='" . makeSafe($id) . "'");
}
$prepared_data = array();
$where = "g.name!='{$adminConfig['anonymousGroup']}' and p.allowView>0 ";
if ($search_term) {
$search_term = makeSafe($search_term);
$where .= "and (u.memberID like '%{$search_term}%' or g.name like '%{$search_term}%')";
}
开发者ID:WebxOne,项目名称:swldbav0.6,代码行数:31,代码来源:getUsers.php
示例10: orders_form
//.........这里部分代码省略.........
}
}
// process images
$templateCode = str_replace('<%%UPLOADFILE(OrderID)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(CustomerID)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(EmployeeID)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(OrderDate)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(RequiredDate)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(ShippedDate)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(ShipVia)%%>', '', $templateCode);
$templateCode = str_replace('<%%UPLOADFILE(Freight)%%>', '', $templateCode);
// process values
if ($selected_id) {
$templateCode = str_replace('<%%VALUE(OrderID)%%>', htmlspecialchars($row['OrderID'], ENT_QUOTES, 'iso-8859-1'), $templateCode);
$templateCode = str_replace('<%%URLVALUE(OrderID)%%>', urlencode($urow['OrderID']), $templateCode);
$templateCode = str_replace('<%%VALUE(CustomerID)%%>', htmlspecialchars($row['CustomerID'], ENT_QUOTES, 'iso-8859-1'), $templateCode);
$templateCode = str_replace('<%%URLVALUE(CustomerID)%%>', urlencode($urow['CustomerID']), $templateCode);
$templateCode = str_replace('<%%VALUE(EmployeeID)%%>', htmlspecialchars($row['EmployeeID'], ENT_QUOTES, 'iso-8859-1'), $templateCode);
$templateCode = str_replace('<%%URLVALUE(EmployeeID)%%>', urlencode($urow['EmployeeID']), $templateCode);
$templateCode = str_replace('<%%VALUE(OrderDate)%%>', @date('m/d/Y', @strtotime(htmlspecialchars($row['OrderDate'], ENT_QUOTES, 'iso-8859-1'))), $templateCode);
$templateCode = str_replace('<%%URLVALUE(OrderDate)%%>', urlencode(@date('m/d/Y', @strtotime(htmlspecialchars($urow['OrderDate'], ENT_QUOTES, 'iso-8859-1')))), $templateCode);
$templateCode = str_replace('<%%VALUE(RequiredDate)%%>', @date('m/d/Y', @strtotime(htmlspecialchars($row['RequiredDate'], ENT_QUOTES, 'iso-8859-1'))), $templateCode);
$templateCode = str_replace('<%%URLVALUE(RequiredDate)%%>', urlencode(@date('m/d/Y', @strtotime(htmlspecialchars($urow['RequiredDate'], ENT_QUOTES, 'iso-8859-1')))), $templateCode);
$templateCode = str_replace('<%%VALUE(ShippedDate)%%>', @date('m/d/Y', @strtotime(htmlspecialchars($row['ShippedDate'], ENT_QUOTES, 'iso-8859-1'))), $templateCode);
$templateCode = str_replace('<%%URLVALUE(ShippedDate)%%>', urlencode(@date('m/d/Y', @strtotime(htmlspecialchars($urow['ShippedDate'], ENT_QUOTES, 'iso-8859-1')))), $templateCode);
$templateCode = str_replace('<%%VALUE(ShipVia)%%>', htmlspecialchars($row['ShipVia'], ENT_QUOTES, 'iso-8859-1'), $templateCode);
$templateCode = str_replace('<%%URLVALUE(ShipVia)%%>', urlencode($urow['ShipVia']), $templateCode);
$templateCode = str_replace('<%%VALUE(Freight)%%>', htmlspecialchars($row['Freight'], ENT_QUOTES, 'iso-8859-1'), $templateCode);
$templateCode = str_replace('<%%URLVALUE(Freight)%%>', urlencode($urow['Freight']), $templateCode);
} else {
$templateCode = str_replace('<%%VALUE(OrderID)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(OrderID)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(CustomerID)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(CustomerID)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(EmployeeID)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(EmployeeID)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(OrderDate)%%>', '1', $templateCode);
$templateCode = str_replace('<%%URLVALUE(OrderDate)%%>', urlencode('1'), $templateCode);
$templateCode = str_replace('<%%VALUE(RequiredDate)%%>', '1', $templateCode);
$templateCode = str_replace('<%%URLVALUE(RequiredDate)%%>', urlencode('1'), $templateCode);
$templateCode = str_replace('<%%VALUE(ShippedDate)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(ShippedDate)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(ShipVia)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(ShipVia)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(Freight)%%>', '0', $templateCode);
$templateCode = str_replace('<%%URLVALUE(Freight)%%>', urlencode('0'), $templateCode);
}
// process translations
foreach ($Translation as $symbol => $trans) {
$templateCode = str_replace("<%%TRANSLATION({$symbol})%%>", $trans, $templateCode);
}
// clear scrap
$templateCode = str_replace('<%%', '<!-- ', $templateCode);
$templateCode = str_replace('%%>', ' -->', $templateCode);
// hide links to inaccessible tables
if ($_POST['dvprint_x'] == '') {
$templateCode .= "\n\n<script>\$j(function(){\n";
$arrTables = getTableList();
foreach ($arrTables as $name => $caption) {
$templateCode .= "\t\$j('#{$name}_link').removeClass('hidden');\n";
$templateCode .= "\t\$j('#xs_{$name}_link').removeClass('hidden');\n";
}
$templateCode .= $jsReadOnly;
$templateCode .= $jsEditable;
if (!$selected_id) {
}
$templateCode .= "\n});</script>\n";
}
// ajaxed auto-fill fields
$templateCode .= '<script>';
$templateCode .= '$j(function() {';
$templateCode .= "\tCustomerID_update_autofills{$rnd1} = function(){\n";
$templateCode .= "\t\tnew Ajax.Request(\n";
if ($dvprint) {
$templateCode .= "\t\t\t'orders_autofill.php?rnd1={$rnd1}&mfk=CustomerID&id='+encodeURIComponent('" . addslashes($row['CustomerID']) . "'),\n";
$templateCode .= "\t\t\t{encoding: 'iso-8859-1', method: 'get'}\n";
} else {
$templateCode .= "\t\t\t'orders_autofill.php?rnd1={$rnd1}&mfk=CustomerID&id=' + encodeURIComponent(current_CustomerID{$rnd1}.value),\n";
$templateCode .= "\t\t\t{encoding: 'iso-8859-1', method: 'get', onCreate: function(){ \$('CustomerID{$rnd1}').disable(); \$('CustomerIDLoading').innerHTML='<img src=loading.gif align=top>'; }, onComplete: function(){" . ($arrPerm[1] || ($arrPerm[3] == 1 && $ownerMemberID == getLoggedMemberID() || $arrPerm[3] == 2 && $ownerGroupID == getLoggedGroupID() || $arrPerm[3] == 3) ? "\$('CustomerID{$rnd1}').enable(); " : "\$('CustomerID{$rnd1}').disable(); ") . "\$('CustomerIDLoading').innerHTML='';}}\n";
}
$templateCode .= "\t\t);\n";
$templateCode .= "\t};\n";
if (!$dvprint) {
$templateCode .= "\tif(\$('CustomerID_caption') != undefined) \$('CustomerID_caption').onchange=CustomerID_update_autofills{$rnd1};\n";
}
$templateCode .= "});";
$templateCode .= "</script>";
$templateCode .= $lookups;
// handle enforced parent values for read-only lookup fields
// don't include blank images in lightbox gallery
$templateCode = preg_replace('/blank.gif" rel="lightbox\\[.*?\\]"/', 'blank.gif"', $templateCode);
// don't display empty email links
$templateCode = preg_replace('/<a .*?href="mailto:".*?<\\/a>/', '', $templateCode);
// hook: orders_dv
if (function_exists('orders_dv')) {
$args = array();
orders_dv($selected_id ? $selected_id : FALSE, getMemberInfo(), $templateCode, $args);
}
return $templateCode;
}
开发者ID:bigprof,项目名称:appgini-mssql,代码行数:101,代码来源:orders_dml.php
示例11: setup_database
/**
* return error message as string, or true indicating success
* requires setup to be written first.
*/
function setup_database()
{
$conn = DB_Helper::getInstance(false);
$db_exists = checkDatabaseExists($conn, $_POST['db_name']);
if (!$db_exists) {
if (@$_POST['create_db'] == 'yes') {
try {
$conn->query("CREATE DATABASE {{{$_POST['db_name']}}}");
} catch (DbException $e) {
throw new RuntimeException(getErrorMessage('create_db', $e->getMessage()));
}
} else {
throw new RuntimeException('The provided database name could not be found. Review your information or specify that the database should be created in the form below.');
}
}
// create the new user, if needed
if (@$_POST['alternate_user'] == 'yes') {
$user_list = getUserList($conn);
if ($user_list) {
$user_exists = in_array(strtolower(@$_POST['eventum_user']), $user_list);
if (@$_POST['create_user'] == 'yes') {
if (!$user_exists) {
$stmt = "GRANT SELECT, UPDATE, DELETE, INSERT, ALTER, DROP, CREATE, INDEX ON {{{$_POST['db_name']}}}.* TO ?@'%' IDENTIFIED BY ?";
try {
$conn->query($stmt, array($_POST['eventum_user'], $_POST['eventum_password']));
} catch (DbException $e) {
throw new RuntimeException(getErrorMessage('create_user', $e->getMessage()));
}
}
} else {
if (!$user_exists) {
throw new RuntimeException('The provided MySQL username could not be found. Review your information or specify that the username should be created in the form below.');
}
}
}
}
// check if we can use the database
try {
$conn->query("USE {{{$_POST['db_name']}}}");
} catch (DbException $e) {
throw new RuntimeException(getErrorMessage('select_db', $e->getMessage()));
}
// set sql mode (sad that we rely on old bad mysql defaults)
$conn->query("SET SQL_MODE = ''");
// check the CREATE and DROP privileges by trying to create and drop a test table
$table_list = getTableList($conn);
if (!in_array('eventum_test', $table_list)) {
try {
$conn->query('CREATE TABLE eventum_test (test char(1))');
} catch (DbException $e) {
throw new RuntimeException(getErrorMessage('create_test', $e->getMessage()));
}
}
try {
$conn->query('DROP TABLE eventum_test');
} catch (DbException $e) {
throw new RuntimeException(getErrorMessage('drop_test', $e->getMessage()));
}
// if requested. drop tables first
if (@$_POST['drop_tables'] == 'yes') {
$queries = get_queries(APP_PATH . '/upgrade/drop.sql');
foreach ($queries as $stmt) {
try {
$conn->query($stmt);
} catch (DbException $e) {
throw new RuntimeException(getErrorMessage('drop_table', $e->getMessage()));
}
}
}
// setup database with upgrade script
$buffer = array();
try {
$dbmigrate = new DbMigrate(APP_PATH . '/upgrade');
$dbmigrate->setLogger(function ($e) use(&$buffer) {
$buffer[] = $e;
});
$dbmigrate->patch_database();
$e = false;
} catch (Exception $e) {
}
global $tpl;
$tpl->assign('db_result', implode("\n", $buffer));
if ($e) {
$upgrade_script = APP_PATH . '/upgrade/update-database.php';
$error = array('Database setup failed on upgrade:', "<tt>{$e->getMessage()}</tt>", '', "You may want run update script <tt>{$upgrade_script}</tt> manually");
throw new RuntimeException(implode('<br/>', $error));
}
// write db name now that it has been created
$setup = array();
$setup['database'] = $_POST['db_name'];
// substitute the appropriate values in config.php!!!
if (@$_POST['alternate_user'] == 'yes') {
$setup['username'] = $_POST['eventum_user'];
$setup['password'] = $_POST['eventum_password'];
}
Setup::save(array('database' => $setup));
//.........这里部分代码省略.........
开发者ID:dabielkabuto,项目名称:eventum,代码行数:101,代码来源:index.php
示例12: submitlog_form
//.........这里部分代码省略.........
$templateCode = str_replace('<%%VALUE(website)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(website)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(contactname)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(contactname)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(email)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(email)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(title)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(title)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(version)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(version)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(pdate)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(pdate)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(cost)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(cost)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(ptype)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(ptype)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(install)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(install)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(os)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(os)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(languages)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(languages)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(changeinfo)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(changeinfo)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(category)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(category)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(requirements)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(requirements)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(ksize)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(ksize)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(keywords)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(keywords)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(description)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(description)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(descrlarge)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(descrlarge)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(homepage)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(homepage)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(screenshot)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(screenshot)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(icon)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(icon)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(padfile)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(padfile)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(download)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(download)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(aspnumber)%%>', '', $templateCode);
$templateCode = str_replace('<%%URLVALUE(aspnumber)%%>', urlencode(''), $templateCode);
$templateCode = str_replace('<%%VALUE(backlink)%%>', '', $templateCode);
$templateCode = str_
|
请发表评论