function drawSubtextFields($Parent_Field_ID) { //Get Table ID $Table_ID = ''; $db_handle = connect_DB(); $db_handle->real_query("SELECT Table_ID\n FROM `table_fields`\n WHERE Field_ID = '{$Parent_Field_ID}'"); if ($result = $db_handle->use_result()) { while ($row = $result->fetch_assoc()) { $Table_ID = $row['Table_ID']; } $result->close(); } //Get the fields of this table $arr_fields = array(); $db_handle = connect_DB(); $db_handle->real_query("SELECT Field_Name\n FROM `table_fields`\n WHERE Table_ID = '{$Table_ID}'\n ORDER BY Field_Name "); if ($result = $db_handle->use_result()) { while ($row = $result->fetch_assoc()) { $arr_fields[] = $row['Field_Name']; } $result->close(); } echo '<div name="subtext_div" id="subtext_div" style="width: 100%;">'; $msg = ''; $msg .= 'Possible fields for Child Field Subtext:<br/>'; $fields = ''; foreach ($arr_fields as $field_name) { //make_list($fields, $field_name, ', ', FALSE); $fields .= $field_name . '<br/>'; } $msg .= $fields; displayTip($msg); echo '</div>'; }
$file_contents .= "\r\n\r\n"; fwrite($sqlfile, $file_contents); chmod($filename, 0777); $export_status = 'success'; } else { $errMsg = 'The "Exports" directory (cobalt/Exports) is not writeable. <br />Please make this directory writeable to proceed.'; } } } } drawHeader(); drawPageTitle('Export Project', $errMsg); if ($export_status == 'success') { displayMessage('Success! The SQL file can be found in the Exports directory (cobalt/Exports).'); } elseif ($export_status == 'first run') { displayTip('Export Project creates an SQL file that you can use to copy or transfer your project to another machine. ' . '<br>You can also use this feature to back up this project to a separate location'); } ?> <div class="container_mid_large"> <fieldset class="top"> Export Project as SQL File </fieldset> <fieldset class="middle"> <table class="input_form" width="92%"> <?php drawTextField('Filename (SQL file)', 'Export_Name', FALSE, 'text', TRUE, FALSE, 0, 'size="40"'); ?> </table> </fieldset> <fieldset class="bottom"> <?php
var checkboxes = document.getElementsByTagName('input'); for (var i = 0; i < checkboxes.length; i++) { if (checkboxes[i].type == 'checkbox') { checkboxes[i].checked = false; } } } </script> <?php if ($ShowTables == FALSE) { displayTip('Cobalt can handle multiple databases. <br />Add as many Database Connections pointing to different databases as you need and import all of their tables here, one connection at a time.'); ?> <div class="container_mid"> <fieldset class="top"> Import Tables </fieldset> <fieldset class="middle"> <table class="input_form"> <?php drawSelectField('drawDBConnection', 'DB Connection', 'DB_Connection_ID'); echo '<input type="hidden" name="tablesReady" value="0">'; ?> </table> </fieldset> <fieldset class="bottom">
<input type=submit name=BACK value=BACK>', 'system'); drawFooter(); die; } } } else { $Data_Abstraction = TRUE; $HTML_Class = TRUE; $Validation_Class = TRUE; $Character_Set_Class = TRUE; $Paged_Result_Class = TRUE; } drawHeader(); drawPageTitle('Generate Project', 'All checked files will be generated when you click the "GENERATE!" button. <br> You may uncheck files as necessary.', 'info'); displayTip('Tables that form the "many" part in a One-to-Many relationship usually don\'t need Modules. <br /> Uncheck their Modules checkbox to help keep your resulting project uncluttered, but leave their Subclass checked.'); ?> <script language="JavaScript" type="text/JavaScript"> function checkAll(field) { if(field.length > 1) { for (i = 0; i < field.length; i++) field[i].checked = true ; } else field.checked = true; } function uncheckAll(field) {