private function buildObject($o, $r) { $subformObject = new formObject($this->parentForm, $this->recordID); $subformObject->parentType = 'subform'; $subformObject->session = $this->parentForm->session; $subformObject->formsessionID = $this->parentForm->formsessionID; $subformObject->customDirectory = $this->parentForm->customDirectory; $subformObject->setObjectProperties($o); //---decide whether to show or hide this object $subformObject->displayThisObject = displayCondition($this->parentForm->arrayOfHashVariables, $o->sob_all_display_condition); //---get the value and format it if ($subformObject->objectProperty['sob_' . $subformObject->objectProperty['sob_all_type'] . '_read_only'] != '1') { $GLOBALS['formValues'][] = $this->subformPrefix . $subformObject->objectProperty['sob_all_name']; } $subformObject->objectValue = $subformObject->setValue($this->recordID, $this->parentForm->cloning, $r[$subformObject->objectProperty['sob_all_name']]); //---create the html string that will display it $subformObject->objectHtml = $subformObject->buildObjectHTML($this->CRLF, $this->TAB . $this->TAB, $this->subformPrefix); return $subformObject->objectHtml; }
/** * Display the global menu on the right pan, it' dependant of context */ function displayMenuTitle() { global $SQLiteManagerAuth, $workDb; $linkBase = 'main.php?dbsel=' . $GLOBALS['dbsel']; foreach ($GLOBALS['dbItems'] as $Items) { if (isset($GLOBALS[strtolower($Items)])) { $linkBase .= '&' . strtolower($Items) . '=' . $GLOBALS[strtolower($Items)]; } } $out = ''; $menuItems[] = array('txt' => $GLOBALS['traduct']->get(72), 'url' => $linkBase . '&action=properties'); if (isset($GLOBALS['table']) && $GLOBALS['table'] != '') { if (isset($_REQUEST['currentPage'])) { $valCurrent = $_REQUEST['currentPage']; } else { $valCurrent = $GLOBALS['action']; } $Context = 'Table'; //Items : txt:Text, url:Link, enabled, type, hint, confirm, ... $menuItems[] = array('txt' => $GLOBALS['traduct']->get(73), 'url' => $linkBase . '&action=browseItem'); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(74), 'url' => $linkBase . '&action=sql', 'enabled' => displayCondition('execSQL')); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(206), 'url' => $linkBase . '&action=select'); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(75), 'url' => $linkBase . '&action=insertElement¤tPage=' . $valCurrent, 'enabled' => displayCondition('data') && !$workDb->isReadOnly()); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(222), 'url' => $linkBase . '&action=operation', 'enabled' => displayCondition('properties')); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(76), 'url' => $linkBase . '&action=export', 'enabled' => displayCondition('export')); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(77), 'url' => $linkBase . '&action=empty', 'confirm' => $GLOBALS['traduct']->get(79), 'enabled' => displayCondition('empty') && !$workDb->isReadOnly()); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(15), 'url' => $linkBase . '&action=delete', 'confirm' => $GLOBALS['traduct']->get(80), 'enabled' => displayCondition('del') && !$workDb->isReadOnly()); } elseif (isset($GLOBALS['view']) && $GLOBALS['view'] != '') { $Context = 'View'; $menuItems[] = array('txt' => $GLOBALS['traduct']->get(73), 'url' => $linkBase . '&action=browseItem'); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(74), 'url' => $linkBase . '&action=sql', 'enabled' => displayCondition('execSQL')); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(206, 'Select'), 'url' => $linkBase . '&action=select', 'enabled' => displayCondition('execSQL')); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(76), 'url' => $linkBase . '&action=export', 'enabled' => displayCondition('export')); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(81), 'url' => $linkBase . '&action=add', 'enabled' => displayCondition('properties')); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(15), 'url' => $linkBase . '&action=delete', 'confirm' => $GLOBALS['traduct']->get(82), 'enabled' => displayCondition('del') && !$workDb->isReadOnly()); } elseif (isset($GLOBALS['function']) && $GLOBALS['function'] != '') { $Context = 'Function'; $menuItems[] = array('txt' => $GLOBALS['traduct']->get(74), 'url' => $linkBase . '&action=sql', 'enabled' => displayCondition('execSQL')); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(76), 'url' => $linkBase . '&action=export', 'enabled' => displayCondition('export')); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(81), 'url' => $linkBase . '&action=add', 'enabled' => displayCondition('properties')); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(15), 'url' => $linkBase . '&action=delete', 'confirm' => $GLOBALS['traduct']->get(78), 'enabled' => displayCondition('del') && !$workDb->isReadOnly()); } elseif (isset($GLOBALS['trigger']) && $GLOBALS['trigger'] != '') { $Context = 'Trigger'; $menuItems[] = array('txt' => $GLOBALS['traduct']->get(74), 'url' => $linkBase . '&action=sql', 'enabled' => displayCondition('execSQL')); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(81), 'url' => $linkBase . '&action=add', 'enabled' => displayCondition('properties')); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(15), 'url' => $linkBase . '&action=delete', 'confirm' => $GLOBALS['traduct']->get(83), 'enabled' => displayCondition('del') && !$workDb->isReadOnly()); } else { $Context = 'Database'; $hintContext = html_entity_decode($GLOBALS['traduct']->get(131), ENT_NOQUOTES, $GLOBALS['charset']); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(84), 'url' => $linkBase . '&action=options'); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(74), 'url' => $linkBase . '&action=sql', 'enabled' => displayCondition('execSQL')); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(76), 'url' => $linkBase . '&action=export', 'enabled' => displayCondition('export')); $menuItems[] = array('txt' => $GLOBALS['traduct']->get(15), 'url' => $linkBase . '&action=del', 'confirm' => $GLOBALS['traduct']->get(85), 'enabled' => displayCondition('del')); } if (!isset($hintContext)) { $hintContext = $GLOBALS['itemTranslated'][$Context]; } if (ALLOW_EXEC_PLUGIN) { $plugins = getPlugins(); foreach ($plugins as $plugin_path) { $plugin_menu = array(); include_once $plugin_path . 'plugin.php'; if (@$plugin_menu[$Context]) { $menu = 'plugin_' . $Context . 'Menu'; $pluginItems = @${$menu}; if (isset($pluginsItems) && @count($pluginsItems)) { foreach ($pluginsItems as $key => $item) { if (array_key_exists('hint', $item)) { $pluginItems[$key]['hint'] = $hintContext . ' : ' . $plugin_name . ' : ' . $item['hint']; } elseif (isset($item['txt'])) { $pluginItems[$key]['hint'] = $hintContext . ' : ' . $plugin_name . ' : ' . $item['txt']; } } } if (isset($pluginItems)) { foreach ($pluginItems as $item) { $pluginsItems[] = $item; } } } } if (isset($pluginsItems)) { $menuItems[] = array('type' => '_cmSplit'); $menuItems[] = array('type' => 'folder', 'txt' => $GLOBALS['traduct']->get(211, 'Plugins'), 'url' => '#'); foreach ($pluginsItems as $item) { $menuItems[] = $item; } $menuItems[] = array('type' => 'endfolder'); } $menuItems[] = array('type' => '_cmSplit'); } /* Javascript Menu */ $out .= "\n\t\t\t" . '<script type="text/javascript">' . "\n\t\t\t\t" . 'var jsMenu = ['; $icon = ''; $inFolder = ''; $target = 'main'; foreach ($menuItems as $item) { $confirm = ''; $title = isset($item['txt']) ? $item['txt'] : ''; $icon = array_key_exists('icon', $item) ? '<img class="seq1" src="' . $item['icon'] . '"><img class="seq2" src="' . $item['icon'] . '">' : ' '; $description = array_key_exists('hint', $item) ? $item['hint'] : $hintContext . ' : ' . $title; $description = addslashes(html_entity_decode($description, ENT_NOQUOTES, $GLOBALS['charset'])); if (!array_key_exists('enabled', $item) || @$item['enabled']) { $url = isset($item['url']) ? $item['url'] : ''; if (isset($item['confirm'])) { $confirm = addslashes(html_entity_decode($item['confirm'], ENT_NOQUOTES, $GLOBALS['charset'])); } } else { $url = ''; $title = '<i>' . $title . '</i>'; $description = '[DISABLED] ' . $description; } if ($url == '') { $url = '#'; } $line = "\n\t\t\t\t" . $inFolder . "['{$icon}', '{$title}', '{$url}', '{$target}', '{$description}', '{$confirm}'"; if (!isset($item['type'])) { $line .= '],'; } else { if ($item['type'] == 'endfolder') { $out = substr($out, 0, strlen($out) - 1); $line = "\n\t\t\t\t" . '],'; $inFolder = ''; } elseif ($item['type'] == 'folder') { $line .= ','; $inFolder .= "\t"; } else { $line = "\n\t\t\t\t" . $item['type'] . ','; } } $out .= $line; } $out = substr($out, 0, strlen($out) - 1); global $jsmenu_style; if (!isset($jsmenu_style)) { $jsmenu_style = 'hbr'; } $out .= "\n\t\t\t\t" . "];" . "\n\t\t\t\t" . "cmDraw ('CommandMenu', jsMenu, '{$jsmenu_style}', cmThemeOffice, 'ThemeOffice');" . "\n\t\t\t" . "</script>" . "\n\t\t"; /* */ echo '<!-- common.lib.php : displayMenuTitle() -->' . "\n"; echo ' <div align="center"> <table class="menu" cellspacing="0" cellpadding="0"> <tr><td> <div id="CommandMenu">' . $out . '</div> </td></tr> </table> </div>'; }
$plugin_email = '*****@*****.**'; $plugin_web = 'http://tpruvot.free.fr'; //Please keep this syntax for other plugins $plugin_version = '0.9.0 beta'; //Date format : YYYY-MM-DD $plugin_date = '2004-11-27'; //SQLiteManager min version $sqlmgr_min_ver = '1.0.5'; //SQLite version range $sqlite_min_ver = '2.8.0'; //$sqlite_max_ver = '2.9.9'; //Menus $plugin_menu = array('Home' => 0, 'Database' => is_plugin_compatible_Pear_Tools(), 'Table' => 0, 'View' => 0, 'Trigger' => 0, 'Function' => 0); $plugin_pics = $plugin_path . 'pics/'; $linkBase = 'main.php?dbsel=' . $GLOBALS['dbsel'] . "&plugin=" . $plugin_key; //Menu Items : txt:Title, url:Link, enabled, type, hint, confirm, icon ... //************** Database Menu ***************** $plugin_DatabaseMenu = array(array('type' => 'folder', 'txt' => $plugin_name), array('txt' => 'Import XML File...', 'url' => $linkBase . '&action=ImportXML', 'enabled' => !$workDb->isReadOnly() && displayCondition('data')), array('txt' => 'Export XML File...', 'url' => $linkBase . '&action=ExportXML', 'enabled' => !$workDb->isReadOnly() && displayCondition('data')), array('type' => '_cmSplit'), array('txt' => 'Plugin Homepage...', 'url' => $plugin_web, 'icon' => $plugin_path . 'pics/url.png'), array('type' => 'endfolder')); //************** Table Menu ***************** $plugin_TableMenu = array(array('type' => 'folder', 'txt' => $plugin_name), array('txt' => 'Import XML File...', 'url' => $linkBase . '&action=ImportXML' . '&table=' . $GLOBALS['table'], 'enabled' => !$workDb->isReadOnly() && displayCondition('data')), array('txt' => 'Export XML File...', 'url' => $linkBase . '&action=ExportXML' . '&table=' . $GLOBALS['table'], 'enabled' => !$workDb->isReadOnly() && displayCondition('data')), array('type' => '_cmSplit'), array('txt' => 'Plugin Homepage...', 'url' => $plugin_web, 'icon' => $plugin_path . 'pics/url.png'), array('type' => 'endfolder')); //************** View Menu ***************** $plugin_ViewMenu = array(array('type' => 'folder', 'txt' => $plugin_name), array('type' => '_cmSplit'), array('txt' => 'Plugin Homepage...', 'url' => $plugin_web, 'icon' => $plugin_path . 'pics/url.png'), array('type' => 'endfolder')); //************** Trigger Menu ***************** //$plugin_TriggerMenu = array(); //************** Function Menu ***************** //$plugin_FunctionMenu = array(); //############################################################################## //Include only when execution needed if (isset($GLOBALS['plugin']) && $GLOBALS['plugin'] == $plugin_key && !$workDb->isReadOnly()) { include_once 'sqlite_xml.php'; }
echo "\t\t<td class=\"tabprop\" align='center'><span style='color: gray'>" . displayPics("edittrash_off.png", $traduct->get(77)) . "</span></td>\n"; } if ($item == 'Table' || $item == 'View') { echo ' <td class="tabprop" align="center">' . $nbEnr . '</td> </tr>'; } } echo ' <tr> <td align="center" class="tabproptitle" style="white-space: nowrap">' . $totItem . ' ' . $itemTranslated[$item] . $traduct->get(228) . '</td> <td colspan="' . $colspan . '" class="tabproptitle"> </td>' . "\n"; if ($item == 'Table' || $item == 'View') { echo ' <td align="center" class="tabproptitle">' . $totEnr . '</td>' . "\n"; } echo ' </tr>'; echo '</table>'; } else { echo ' '; } if (!$workDb->isReadOnly() && displayCondition('properties')) { formAddItem($item); } ?> </fieldset> </td></tr></table> </center> <?php } ?> </body> </html>
/** * Display current VIEW properties * * @access public */ function propView() { echo '<!-- SQLiteViewProperties.class.php : propView() -->' . "\n"; echo '<br>'; echo ' <table cellpadding="2" cellspacing="0" width="90%" class="viewProp"> <tr class="viewPropTitle"><td align="right" width="20%" class="viewPropTitle">' . $GLOBALS['traduct']->get(19) . ' : </td><td align="center" class="viewPropTitle">' . $this->view . '</td></tr> <tr><td align="right" class="viewProp">' . $GLOBALS['traduct']->get(61) . ' : </td><td class="viewProp">' . highlight_query($this->viewProperties) . '</td></tr> </table>'; echo '<div align="center">'; if (!$GLOBALS['workDb']->isReadOnly() && displayCondition('properties')) { echo '<a href="main.php?dbsel=' . $GLOBALS['dbsel'] . '&view=' . $this->view . '&action=modify" class="base" target="main">' . $GLOBALS['traduct']->get(14) . '</a>'; } else { echo '<span class="base"><i>' . $GLOBALS['traduct']->get(14) . '</i></span>'; } echo str_repeat(' ', 10); if (!$GLOBALS['workDb']->isReadOnly() && displayCondition('del')) { echo '<a href="main.php?dbsel=' . $GLOBALS['dbsel'] . '&view=' . $this->view . '&action=delete" class="base" target="main">' . $GLOBALS['traduct']->get(15) . '</a>'; } else { echo '<span class="base"><i>' . $GLOBALS['traduct']->get(15) . '</i></span>'; } echo '</div>'; }
$DbGrid->show(); echo '<!-- browse.php -->' . "\n"; echo '<div class="BrowseOptions">'; if (empty($view) && (!$workDb->isReadOnly() && displayCondition("properties"))) { echo '<hr width="60%"> <form name="addView" action="main.php?dbsel=' . $GLOBALS['dbsel'] . '" method="POST" target="main"> <table class="BrowseOption"><tr><td> » ' . $GLOBALS['traduct']->get(97) . ' <input type="text" class="text" name="ViewName" value="" /> ' . $GLOBALS['traduct']->get(98) . ' <input class="button" type="submit" value="' . $GLOBALS['traduct']->get(69) . '" /> </td></tr></table> <input type="hidden" name="action" value="save" /> <input type="hidden" name="ViewProp" value="' . urlencode($DisplayQuery) . '" /> </form>'; } if ($accessResult && displayCondition('export')) { echo '<hr width="60%">'; echo ' <table class="BrowseOption"><tr><td> <a href="main.php?dbsel=' . $GLOBALS['dbsel'] . '&table=' . $GLOBALS['table'] . '&queryExport=' . urlencode($DisplayQuery) . '&action=export" class="Browse"> » ' . $GLOBALS['traduct']->get(76) . '</a> </td></tr></table>'; } echo '</div>'; echo '</td></tr></table>'; } if (!$DbGrid->getNbRecord()) { $SQLiteQuery->getForm($DbGrid->getRealQuery()); } } else { if (!$SQLiteQuery->multipleQuery && (!isset($noDisplay) || !$noDisplay)) { displayQuery($DisplayQuery, true, $SQLiteQuery->changesLine); } else {
private function buildObject($o) { $this->bgcolor = iif($this->bgcolor == 'Gainsboro', 'white', 'Gainsboro'); $formObject = new formObject($this, $this->recordID); $formObject->bgcolor = $this->bgcolor; $formObject->parentType = 'form'; $formObject->formsessionID = $this->formsessionID; $formObject->setObjectProperties($o); //---decide whether to show or hide this object $formObject->displayThisObject = displayCondition($o->sob_all_display_condition, $this->recordID, $this->recordValues); //---get the value and format it if ($this->holdingValues == 1) { $formObject->objectValue = $this->holdingValue($this->formID . $this->recordID . $this->session, $formObject->objectProperty['sob_all_name']); if ($formObject->objectProperty['sob_all_type'] == 'lookup') { $formObject->lookupArray['id'] = $this->holdingValue($this->formID . $this->recordID . $this->session, $formObject->objectProperty['sob_all_name']); //------- //--get sql from lookup form $lookupFormID = $formObject->objectProperty['sob_lookup_zzsysform_id']; $t = nuRunQuery("SELECT * FROM zzsys_form WHERE zzsys_form_id = '{$lookupFormID}'"); $r = db_fetch_object($t); $TT = $this->TT; $browseTable = $TT; eval($r->sfo_custom_code_run_before_browse); $SQLwithGlobalValues = replaceVariablesInString($this->TT, $r->sfo_sql, ''); $SQLwithRecordValues = getSqlRecordValues($SQLwithGlobalValues, $this->parentForm->recordAndFieldValues); $SQL = new sqlString($SQLwithRecordValues); //------- // $SQL = new sqlString(replaceVariablesInString($formObject->TT,$formObject->objectProperty['sob_lookup_sql'], '')); $SQL->setWhere("WHERE " . $formObject->objectProperty['sob_lookup_id_field'] . " = '{$formObject->objectValue}'"); $SQL->removeAllFields(); $SQL->addField($formObject->objectProperty['sob_lookup_id_field']); $SQL->addField($formObject->objectProperty['sob_lookup_code_field']); $SQL->addField($formObject->objectProperty['sob_lookup_description_field']); $T = nuRunQuery($SQL->SQL); $R = db_fetch_row($T); $formObject->lookupArray['id'] = $R[0]; $formObject->lookupArray['code'] = $R[1]; $formObject->lookupArray['description'] = $R[2]; } } else { $formObject->objectValue = $formObject->setValue($this->recordID, $this->cloning, $this->recordValues[$formObject->objectProperty['sob_all_name']]); } //---create the html string that will display it $formObject->objectHtml = $formObject->buildObjectHTML($this->CRLF, $this->TAB . $this->TAB . $this->TAB . $this->TAB . $this->TAB, ''); $this->formObjects[] = $formObject; nuRunQuery("DROP TABLE IF EXISTS {$formObject->TT}"); }
/** * Display current FUNCITION properties * * @access public */ function propView() { echo '<!-- SQLiteFunctionProperties.class.php : propView() -->' . "\n"; echo '<br><center>'; $funct_code = highlight_string("<?php\n" . $this->functionProperties['funct_code'] . "\n?>", true); $funct_finale_code = highlight_string($this->functionProperties['funct_final_code'], true); echo ' <table cellpadding="2" cellspacing="0" width="80%" class="viewProp"> <tr class="viewPropTitle"><td align="right" width="20%" class="viewPropTitle">' . $GLOBALS['traduct']->get(19) . ' : </td><td align="center" class="viewPropTitle">' . htmlentities($this->function, ENT_NOQUOTES, $GLOBALS['charset']) . '</td></tr> <tr><td align="right" class="viewProp">Type : </td><td align="center" class="viewProp">' . ($this->functionProperties['funct_type'] == 1 ? $GLOBALS['traduct']->get(10) : $GLOBALS['traduct']->get(11)) . '</td></tr> <tr><td align="right" class="viewProp">' . $GLOBALS['traduct']->get(10) . ' : </td><td class="viewProp">' . $funct_code . '</td></tr>'; if ($this->functionProperties['funct_type'] == 2) { echo ' <tr><td align="right" class="viewProp">' . $GLOBALS['traduct']->get(12) . ' : </td><td class="viewProp">' . $funct_final_code . '</td></tr>'; } echo ' <tr><td align="right" class="viewProp">' . $GLOBALS['traduct']->get(13) . ' : </td><td class="viewProp">' . $this->functionProperties['funct_num_args'] . '</td></tr>'; echo ' </table>'; echo '<div align="center">'; if (!$GLOBALS['workDb']->isReadOnly() && displayCondition('properties')) { echo '<a href="main.php?dbsel=' . $GLOBALS['dbsel'] . '&function=' . $this->function . '&action=modify" class="base" target="main">' . $GLOBALS['traduct']->get(14) . '</a>'; } else { echo '<span class="base"><i>' . $GLOBALS['traduct']->get(14) . '</i></span>'; } echo str_repeat(' ', 10); if (!$GLOBALS['workDb']->isReadOnly() && displayCondition('del')) { echo '<a href="main.php?dbsel=' . $GLOBALS['dbsel'] . '&function=' . $this->function . '&action=delete" class="base" target="main">' . $GLOBALS['traduct']->get(15) . '</a>'; } else { echo '<span class="base"><i>' . $GLOBALS['traduct']->get(15) . '</i></span>'; } echo '</div>'; echo '</center>'; }
/** * Display Available Operation * * @access public */ function operationView() { $ModifPropOk = !$GLOBALS['workDb']->isReadOnly() && displayCondition('properties'); $localTableProp = new SQLiteTableProperties($this->connId); $fieldInfo = $localTableProp->getTableProperties($GLOBALS["table"]); // build select field $fieldList = '<select name="field">'; foreach ($fieldInfo as $info) { $fieldList .= '<option value="' . $info["cid"] . '">' . $info["name"] . '</option>'; } $fieldList .= '</select>'; echo '<center> <table cellspacing="0" width="80%"> <tr> <td>'; echo ' <form name="Rename" action="main.php" method="POST" target="main"> <table class="Browse" cellspacing="0" width="100%"> <thead> <tr class="Browse"> <td colspan=2 align="left" class="tapPropTitle"> ' . $GLOBALS["traduct"]->get(215) . '</td> </tr> </thead>' . "\n"; echo ' <tr> <td> <input type="text" name="newName" size=15> </td><td align="right"><input type="submit" value="' . $GLOBALS["traduct"]->get(69) . '" class="button"></td> </tr> </table> <input type="hidden" name="dbsel" value="' . $GLOBALS["dbsel"] . '"> <input type="hidden" name="table" value="' . $GLOBALS["table"] . '"> <input type="hidden" name="action" value="' . $GLOBALS["action"] . '"> <input type="hidden" name="operation_action" value="renameTable"> </form>'; echo ' </td> </tr>'; echo ' <tr> <td>'; echo ' <form name="Move" action="main.php" method="POST" target="main"> <table class="Browse" cellspacing="0" width="100%"> <thead> <tr class="Browse"> <td colspan=2 align="left" class="tapPropTitle"> ' . $GLOBALS["traduct"]->get(216) . '</td> </tr> </thead>' . "\n"; echo ' <tr> <td> ' . $this->getDbList() . '.<input type="text" name="moveName" size=15> </td> <td align="right"><input type="submit" value="' . $GLOBALS["traduct"]->get(69) . '" class="button"></td> </tr> </table> <input type="hidden" name="dbsel" value="' . $GLOBALS["dbsel"] . '"> <input type="hidden" name="table" value="' . $GLOBALS["table"] . '"> <input type="hidden" name="action" value="' . $GLOBALS["action"] . '"> <input type="hidden" name="operation_action" value="moveTable"> </form>'; echo ' </td> </tr>'; echo ' <tr> <td>'; echo ' <form name="Copy" action="main.php" method="POST" target="main"> <table class="Browse" cellspacing="0" width="100%"> <thead> <tr class="Browse"> <td colspan=3 align="left" class="tapPropTitle"> ' . $GLOBALS["traduct"]->get(217) . '</td> </tr> </thead>' . "\n"; echo ' <tr> <td> ' . $this->getDbList($GLOBALS["dbsel"]) . '.<input type="text" name="copyName" size=15> </td> <td style="white-space: nowrap"> <input name="whatToDo" value="structure" style="vertical-align: middle;" type="radio"> <label>' . $GLOBALS["traduct"]->get(124) . '</label> <br> <input name="whatToDo" value="data" checked="checked" style="vertical-align: middle;" type="radio"> <label>' . $GLOBALS["traduct"]->get(125) . '</label> <br> <input name="whatToDo" value="dataonly" style="vertical-align: middle;" type="radio"> <label>' . $GLOBALS["traduct"]->get(126) . '</label> <br> <input name="dropTable" value="true" style="vertical-align: middle;" type="checkbox"> <label>' . $GLOBALS["traduct"]->get(218) . '</label> <br> </td> <td align="right"><input type="submit" value="' . $GLOBALS["traduct"]->get(69) . '" class="button"></td> </tr> </table> <input type="hidden" name="dbsel" value="' . $GLOBALS["dbsel"] . '"> <input type="hidden" name="table" value="' . $GLOBALS["table"] . '"> <input type="hidden" name="action" value="' . $GLOBALS["action"] . '"> <input type="hidden" name="operation_action" value="copyTable"> </form>'; echo ' </td> </tr> </table> </center>'; }
/** * Display the current TRIGGER properties * * @access public */ function propView() { $tabTrigInfo = $this->extractProperties($this->triggerProperties); $triggView = 'CREATE TRIGGER ' . brackets($this->trigger) . ' ' . $tabTrigInfo['TriggerMoment']; if ($tabTrigInfo['TriggerMoment'] != '') { $triggView .= ' '; } $triggView .= $tabTrigInfo['TriggerEvent'] . $tabTrigInfo['ColumnList'] . ' '; $triggView .= 'ON ' . brackets($tabTrigInfo['TriggerOn']) . ' ' . $tabTrigInfo['TriggerAction']; if ($tabTrigInfo['TriggerAction'] != '') { $triggView .= ' '; } if ($tabTrigInfo['TriggerCondition'] == 'WHEN ') { $triggView .= 'WHEN ' . $tabTrigInfo['ConditionList'] . ' '; } $triggView .= "\n" . 'BEGIN ' . "\n" . $tabTrigInfo["TriggerStep"] . "\n" . ' END;' . "\n"; echo '<br>'; echo ' <table cellpadding="2" cellspacing="0" width="90%" class="viewProp"> <tr class="viewPropTitle"><td align="right" width="20%" class="viewPropTitle">' . $GLOBALS['traduct']->get(19) . " : </td><td align='center' class='viewPropTitle'>" . $this->trigger . "</td></tr>\n\t\t\t\t\t<tr><td align='right' class='viewProp'>" . $GLOBALS['traduct']->get(53) . " : </td><td class='viewProp'>" . nl2br($triggView) . "</td></tr>"; echo ' </table>'; echo '<div align="center">'; if (!$GLOBALS['workDb']->isReadOnly() && displayCondition('properties')) { echo "<a href=\"main.php?dbsel=" . $GLOBALS["dbsel"] . "&trigger=" . $this->trigger . "&action=modify\" class='base' target=\"main\">" . $GLOBALS['traduct']->get(14) . '</a>'; } else { echo '<span class="base"><i>' . $GLOBALS['traduct']->get(14) . '</i></span>'; } echo str_repeat(' ', 10); if (!$GLOBALS['workDb']->isReadOnly() && displayCondition('del')) { echo '<a href="main.php?dbsel=' . $GLOBALS['dbsel'] . '&trigger=' . $this->trigger . '&action=delete" class="base" target="main">' . $GLOBALS['traduct']->get(15) . '</a>'; } else { echo '<span class="base"><i>' . $GLOBALS['traduct']->get(15) . '</i></span>'; } echo '</div>'; }
/** * Display Available Option * * @access public */ function optionView() { if ($tabInfoDb = @stat($this->connId->baseName)) { if ($tabInfoDb['size'] < 1024) { $size = $tabInfoDb['size'] . 'o'; } elseif ($tabInfoDb['size'] < 1024 * 1024) { $size = number_format($tabInfoDb['size'] / 1024, 2, ',', '') . 'Ko'; } elseif ($tabInfoDb['size'] < 1024 * 1024 * 1024) { $size = number_format($tabInfoDb['size'] / (1024 * 1024), 2, ',', '') . 'Mo'; } $perm = substr(sprintf("%o", fileperms($this->connId->baseName)), 3); for ($i = 0; $i < 3; $i++) { $currPerm = substr($perm, $i, 1); $strPerm = ''; if ($currPerm & 4) { $strPerm .= 'r'; } else { $strPerm .= '-'; } if ($currPerm & 2) { $strPerm .= 'w'; } else { $strPerm .= '-'; } if ($currPerm & 1) { $strPerm .= 'x'; } else { $strPerm .= '-'; } $tabPerm[$i] = $strPerm; } $perms = $tabPerm[2] . $tabPerm[1] . $tabPerm[0]; $dateModif = date('d-m-Y H:i:s', $tabInfoDb['mtime']); } $res = $this->connId->getResId('PRAGMA ' . ($this->connId->connId->getVersion() == 3 ? '' : 'default_') . 'synchronous;'); $tabSynchro = $this->connId->getArray(); if (isset($tabSynchro[0])) { $valSynchro = $tabSynchro[0]['synchronous']; } else { $valSynchro = ""; } $res = $this->connId->getResId('PRAGMA cache_size;'); $tabCache = $this->connId->getArray(); if (isset($tabCache[0])) { $valCache = $tabCache[0]['cache_size']; } else { $valCache = ""; } $res = $this->connId->getResId('PRAGMA ' . ($this->connId->connId->getVersion() == 3 ? '' : 'default_') . 'temp_store;'); $tabTempStore = $this->connId->getArray(); if (isset($tabTempStore[0])) { $valTempStore = $tabTempStore[0]['temp_store']; } else { $valTempStore = ""; } if (DEMO_MODE) { $dbLocation = '/***/***/' . basename($this->connId->baseName); } else { $dbLocation = $this->connId->baseName; } $ModifPropOk = !$GLOBALS['workDb']->isReadOnly() && displayCondition('properties'); echo ' <center><table width="80%"><tr><td align="center">'; echo ' <fieldset><legend>' . $GLOBALS['traduct']->get(178) . '</legend>'; echo ' <table cellspacing="0" cellpadding="4"> <tr><td> </td><td> <table> <tr bgcolor="#e7dfce"><td class="Browse"><span class="infosTitle">' . $GLOBALS['traduct']->get(179) . ' </span></td><td class="Browse"><span class="infos">' . $dbLocation . '</span></td></tr> <tr bgcolor="#f7f3ef"><td class="Browse"><span class="infosTitle">' . $GLOBALS['traduct']->get(180) . ' </span></td><td class="Browse"><span class="infos">' . $size . '</span></td></tr> <tr bgcolor="#e7dfce"><td class="Browse"><span class="infosTitle">' . $GLOBALS['traduct']->get(181) . ' </span></td><td class="Browse"><span class="infos">' . $perms . '</span></td></tr> <tr bgcolor="#f7f3ef"><td class="Browse"><span class="infosTitle">' . $GLOBALS['traduct']->get(182) . ' </span></td><td class="Browse"><span class="infos">' . $dateModif . '</span></td></tr> </table> </td></tr> </table>'; echo "\n\t" . '</fieldset>'; echo "\n\t" . '<fieldset><legend>' . $GLOBALS['traduct']->get(212, 'Maintenance') . '</legend>'; echo ' <table cellspacing="0" cellpadding="4"> <tr><td> </td><td>' . "\n"; if ($ModifPropOk) { echo ' <a href="main.php?dbsel=' . $GLOBALS['dbsel'] . '&action=options&option_action=check" class="base" target="main"> » ' . $GLOBALS['traduct']->get(183) . '</a><br/><br/>'; } else { echo ' » <span class="tabprop"><i>' . $GLOBALS['traduct']->get(183) . '</i></span><br/><br/>'; } if ($ModifPropOk) { echo ' <a href="main.php?dbsel=' . $GLOBALS['dbsel'] . '&action=options&option_action=vacuum" class="base" target="main"> » ' . $GLOBALS['traduct']->get(184) . '</a>'; } else { echo ' » <span class="tabprop"><i>' . $GLOBALS['traduct']->get(184) . '</i></span>'; } echo ' </td></tr> </table>'; echo "\n\t" . '</fieldset>'; echo ' <fieldset><legend>' . $GLOBALS['traduct']->get(84) . '</legend>'; echo ' <table align="center" cellpadding="10" cellspacing="5"> <tr><td colspan=2 align="center"> <form name="formOption" action="main.php?dbsel=' . $GLOBALS['dbsel'] . '&action=options&option_action=save" method="POST" target="main"> <table style="font-size: 11px"> <tr> <td align="right">' . $GLOBALS['traduct']->get(185) . ' </td> <td align="right">' . $GLOBALS['traduct']->get(187) . '<input type="radio" name="synchro" value="0"' . ($valSynchro == 0 ? ' checked="checked"' : '') . ($ModifPropOk ? '' : ' disabled="disabled"') . '></td> <td align="right">' . $GLOBALS['traduct']->get(188) . '<input type="radio" name="synchro" value="1"' . ($valSynchro == 1 ? ' checked="checked"' : '') . ($ModifPropOk ? "" : ' disabled="disabled"') . '></td> <td align="right">' . $GLOBALS['traduct']->get(189) . '<input type="radio" name="synchro" value="2"' . ($valSynchro == 2 ? ' checked="checked"' : '') . ($ModifPropOk ? '' : ' disabled="disabled"') . '></td> </tr> <tr> <td align="right">' . $GLOBALS['traduct']->get(186) . ' </td> <td colspan="3"><input type="text" class="text" name="cache_size" value="' . $valCache . '" size="5"' . ($ModifPropOk ? '' : ' disabled="disabled"') . '></td> </tr> <tr> <td align="right">' . $GLOBALS['traduct']->get(193) . ' </td> <td align="right">' . $GLOBALS['traduct']->get(194) . '<input type="radio" name="temp_store" value="0"' . ($valTempStore == 0 ? ' checked="checked"' : '') . ($ModifPropOk ? '' : " disabled") . '></td> <td align="right">' . $GLOBALS['traduct']->get(195) . '<input type="radio" name="temp_store" value="1"' . ($valTempStore == 1 ? ' checked="checked"' : '') . ($ModifPropOk ? '' : " disabled") . '></td> <td align="right">' . $GLOBALS['traduct']->get(196) . '<input type="radio" name="temp_store" value="2"' . ($valTempStore == 2 ? ' checked="checked"' : '') . ($ModifPropOk ? '' : " disabled") . '></td> </tr> </table> <br>'; if ($ModifPropOk) { echo ' <input class="button" type="submit" value="' . $GLOBALS['traduct']->get(200, 'Update') . '">'; } echo ' </form> </td></tr> </table>'; echo '</fieldset></td></tr></table>'; echo $this->attachDb() . '</center>'; }
/** * Display one index properties */ function linePropView($i, $info) { static $indexI; if ($indexI == '') { $indexI = 0; } if ($indexI % 2) { $localBgColor = $GLOBALS['browseColor1']; } else { $localBgColor = $GLOBALS['browseColor2']; } echo ' <tr bgcolor="' . $localBgColor . '" ' . 'onMouseOver="' . "setRowColor(this, {$indexI}, 'over', '{$localBgColor}', '" . $GLOBALS['browseColorOver'] . "', '" . $GLOBALS["browseColorClick"] . "')\" " . 'onMouseOut="' . "setRowColor(this, {$indexI}, 'out', '{$localBgColor}', '" . $GLOBALS["browseColorOver"] . "', '" . $GLOBALS["browseColorClick"] . "')\">\n" . ' <td align="left" class="Index">' . $info['name'] . '</td> <td align="left" class="Index">' . $info['type'] . '</td> <td align="right" class="Index">' . implode('<br>', $info['champ']) . '</td>'; if (strtoupper($i) != 'PRIMARY') { echo ' <td align="center" class="Index">'; if (!$GLOBALS['workDb']->isReadOnly() && displayCondition('properties')) { echo '<a href="main.php?dbsel=' . $GLOBALS['dbsel'] . '&table=' . $this->table . '&index_action=modify&indexSeq=' . $i . '" class="Browse" target="main">' . displayPics('edit.png', $GLOBALS['traduct']->get(14)) . '</a>'; } else { echo '<i>' . displayPics('edit_off.png', $GLOBALS['traduct']->get(14)) . '</i>'; } echo '</td>'; echo ' <td align="center" class="Index">'; if (!$GLOBALS['workDb']->isReadOnly() && displayCondition('properties')) { echo "<a href=\"#\" onClick=\"javascript:if(confirm('" . addslashes($GLOBALS['traduct']->get(92)) . " \\'" . $info['name'] . "\\'')) parent.main.location='main.php?dbsel=" . $GLOBALS['dbsel'] . "&table=" . $this->table . "&index_action=delete&indexSeq=" . $i . "';" . '" class="Browse">' . displayPics('edittrash.png', $GLOBALS['traduct']->get(15)) . '</a>'; } else { echo '<i>' . displayPics('edittrash_off.png', $GLOBALS['traduct']->get(15)) . '</i>'; } echo '</td>'; } else { echo ' <td align="center" class="Index"> </td>'; echo ' <td align="center" class="Index"> </td>'; } echo ' </tr>'; $indexI++; }
/** * Display one column properties * * @access private * @param integer $index Number of column */ function linePropView($index) { if ($index % 2) { $localBgColor = $GLOBALS['browseColor1']; } else { $localBgColor = $GLOBALS['browseColor2']; } $textConfirm = $GLOBALS['traduct']->get(39) . '\\n' . $this->infoTable[$index]['name'] . '?'; if (!$this->infoTable[$index]['notnull']) { $defltValue = '<i>NULL</i>'; } elseif ($this->infoTable[$index]['dflt_value'] == '') { $defltValue = ' '; } else { $defltValue = $this->infoTable[$index]['dflt_value']; } $out = ''; $out .= "\t<tr bgcolor='" . $localBgColor . "' onMouseOver=\"setRowColor(this, {$index}, 'over', '" . $localBgColor . "', '" . $GLOBALS['browseColorOver'] . "', '" . $GLOBALS['browseColorClick'] . "')\"\r\n\t\t\t\t\t\t\t\t\tonMouseOut=\"setRowColor(this, {$index}, 'out', '" . $localBgColor . "', '" . $GLOBALS['browseColorOver'] . "', '" . $GLOBALS['browseColorClick'] . "')\">\n"; if (!$GLOBALS['workDb']->isReadOnly() && displayCondition("properties")) { $out .= '<td align="center" class="Browse"><input type="checkbox" name="modify[' . $index . ']"></td>' . "\n"; } $out .= '<td align="left" class="Browse">' . $this->infoTable[$index]['name'] . '</td>' . "\n"; $out .= '<td align="left" class="Browse">' . strtoupper($this->infoTable[$index]['type']) . '</td>' . "\n"; $out .= '<td align="center" class="Browse">' . (!$this->infoTable[$index]['notnull'] ? $GLOBALS['traduct']->get(40) : $GLOBALS['traduct']->get(41)) . '</td>' . "\n"; $out .= '<td align="right" class="Browse">' . $defltValue . '</td>' . "\n"; $out .= '<td align="center" class="Browse" width="7%">'; if (!$GLOBALS['workDb']->isReadOnly() && displayCondition("properties")) { $out .= "<a href=\"#\" onClick=\"javascript:setTableAction('tabprop', " . $index . ", 'modify');\" class=\"Browse\">" . displayPics("edit.png", $GLOBALS['traduct']->get(14)) . "</a>"; } else { $out .= "<i>" . displayPics("edit_off.png", $GLOBALS['traduct']->get(14)) . "</i>"; } $out .= '</td>' . "\n"; $out .= '<td align="center" class="Browse" width="7%">'; if (!$GLOBALS['workDb']->isReadOnly() && displayCondition("properties")) { $out .= "<a href=\"#\" onClick=\"javascript:if(confirm('" . $textConfirm . "')) setTableAction('tabprop', " . $index . ", 'delete');\" class=\"Browse\">" . displayPics("deletecol.png", $GLOBALS['traduct']->get(15)) . "</a>"; } else { $out .= "<i>" . displayPics("deletecol_off.png", $GLOBALS['traduct']->get(15)) . "</i>"; } $out .= '</td>' . "\n"; $out .= '<td align="center" class="Browse" width="7%">'; if (!$GLOBALS['workDb']->isReadOnly() && displayCondition("properties")) { $out .= "<a href=\"#\" onClick=\"javascript:setTableAction('tabprop', " . $index . ", 'unique');\" class=\"Browse\">" . displayPics("unique.png", $GLOBALS['traduct']->get(197)) . "</a>"; } else { $out .= "<i>" . displayPics("unique_off.png", $GLOBALS['traduct']->get(197)) . "</i>"; } $out .= '</td>' . "\n"; $out .= '<td align="center" class="Browse" width="7%">'; if (!$GLOBALS['workDb']->isReadOnly() && displayCondition("properties")) { $out .= "<a href=\"#\" onClick=\"javascript:setTableAction('tabprop', " . $index . ", 'index');\" class=\"Browse\">" . displayPics("index.png", $GLOBALS['traduct']->get(198)) . "</a>"; } else { $out .= "<i>" . displayPics("index_off.png", $GLOBALS['traduct']->get(198)) . "</i>"; } $out .= '</td>' . "\n"; $out .= '<td align="center" class="Browse" width="7%">'; if ($this->tablePrimary && isset($this->infoTable[$index]['primary']) && $this->infoTable[$index]['primary']) { if (!$GLOBALS['workDb']->isReadOnly() && displayCondition("properties")) { $out .= "<a href=\"#\" onClick=\"javascript:setTableAction('tabprop', " . $index . ", 'noprimary');\" class=\"Browse\">" . displayPics("primaire.png", $GLOBALS['traduct']->get(42)) . "</a>"; } else { $out .= "<i>" . displayPics("primaire_off.png", $GLOBALS['traduct']->get(42)) . "</i>"; } } elseif ($this->tablePrimary && (!isset($this->infoTable[$index]['primary']) || !$this->infoTable[$index]['primary'])) { $out .= ' '; } elseif (!$this->tablePrimary) { if (!$GLOBALS['workDb']->isReadOnly() && displayCondition("properties")) { $out .= "<a href=\"#\" onClick=\"javascript:setTableAction('tabprop', " . $index . ", 'addprimary');\" class=\"Browse\">" . displayPics("primaire.png", $GLOBALS['traduct']->get(42)) . "</a>"; } else { $out .= '<i>' . displayPics("primaire.png", $GLOBALS['traduct']->get(42)) . '</i>'; } } $out .= '</td>'; $out .= ' </tr>'; return $out; }
public function buildHeader() { $dq = '"'; $tempAr = array(); $s = "{$this->CRLF}<div id='logo' style='cursor:hand;overflow:hidden;position:absolute;top:0; left:10; width:150; height:70' >{$this->CRLF}"; if (!$this->isLookup) { if ($this->setup->set_home_mouse_up == '') { $s = $s . "<br/><input id='home_id' type='button' class='actionButton' accesskey='h' value='Home' onclick='backToIndex()'/> {$this->CRLF}"; } else { $s = $s . "<img id='home_id' src='formimage.php?dir={$this->customDirectory}&iid=" . $this->setup->set_home_mouse_up . "' alt='Home' onmouseup=\"this.src=getImage('" . $this->setup->set_home_mouse_up . "')\" onmouseout=\"this.src=getImage('" . $this->setup->set_home_mouse_up . "')\" onmousedown=\"this.src=getImage('" . $this->setup->set_home_mouse_down . "')\" onclick='backToIndex()'/>{$this->CRLF}"; } } $s = $s . "</div>{$this->CRLF}"; $s = $s . "{$this->CRLF}<div id='actionButtons' style='overflow:hidden;position:absolute;top:10; left:165; width:660; height:70' >{$this->CRLF}"; $s = $s . "<table align='center'><tr style='border-width:0;' align='center'><td style='border-width:0;' align='center'>{$this->CRLF}"; $s = $s . "<u>S</u>earch<input name='newsearch' id='newsearch' type='hidden'> <input accesskey='s' onchange={$dq} document.forms[0]['displayPage'].value=1;changeAction();{$dq} class='searchcolor' name='search' id='search' size='60' value=\"" . str_replace('"', """, $_POST['search']) . "\"/> {$this->CRLF}"; if ($this->setup->set_search_mouse_up == '') { $s = $s . "<input type='submit' class='actionButton' value='Search'/> {$this->CRLF}"; } else { $s = $s . "<div style='overflow:hidden;position:absolute;top:0;left:0;height:0;width:0'><input type='submit' class='actionButton' value='Search'/></div>{$this->CRLF}"; $s = $s . "<img height='30' src='formimage.php?dir={$this->customDirectory}&iid=" . $this->setup->set_search_mouse_up . "' alt='Search' onmouseup=\"this.src=getImage('" . $this->setup->set_search_mouse_up . "')\" onmouseout=\"this.src=getImage('" . $this->setup->set_search_mouse_up . "')\" onmousedown=\"this.src=getImage('" . $this->setup->set_search_mouse_down . "')\" onclick='document.thebrowse.submit()'/>{$this->CRLF}"; } // if($this->form->sfo_add_button == '1' and displayCondition($this->form->sfo_add_button_display_condition, '', $tempAr)){ if ($this->form->sfo_add_button == '1' and displayCondition($this->arrayOfHashVariables, $this->form->sfo_add_button_display_condition)) { $title = iif($this->form->sfo_add_title == '', 'Add Record', $this->form->sfo_add_title); if ($this->setup->set_add_mouse_up == '') { $s = $s . "<input type='button' class='actionButton' value='{$title}' accesskey='a' onclick='addThis()'/> {$this->CRLF}"; } else { $s = $s . "<img height='30' src='formimage.php?dir={$this->customDirectory}&iid=" . $this->setup->set_add_mouse_up . "' alt='{$title}' onmouseup=\"this.src=getImage('" . $this->setup->set_add_mouse_up . "')\" onmouseout=\"this.src=getImage('" . $this->setup->set_add_mouse_up . "')\" onmousedown=\"this.src=getImage('" . $this->setup->set_add_mouse_down . "')\" onclick='addThis()'/>{$this->CRLF}"; } } $s = $s . "</td></tr>{$this->CRLF}"; $s = $s . $this->buildPageNumbers(); $s = $s . "</table>{$this->CRLF}"; $s = $s . "</div>{$this->CRLF}"; $dbc = ''; if ($this->zzsys_user_id == 'globeadmin' and $this->form->sys_setup != '1') { $dbc = " ondblclick='openForm(\"form\",\"{$this->oldFormID}\");' "; } $s = $s . "{$this->CRLF}<div {$dbc} id='pagetitle' style='padding:10;font-size:x-small;font-family:tahoma;text-align:center;overflow:hidden;position:absolute;top:-7; left:830; width:150; height:30' >{$this->CRLF}"; $s = $s . "<i>" . $this->form->sfo_title . "</i></div>{$this->CRLF}"; $s = $s . "{$this->CRLF}<div id='loggedin' style='padding:10;font-size:x-small;font-family:tahoma;text-align:center;overflow:hidden;position:absolute;top:25; left:830; width:150; height:45' >{$this->CRLF}"; $s = $s . $GLOBALS['zzsys_user_name'] . "<br/>" . $this->setup->set_title . "</div>{$this->CRLF}"; return $s; }