No table name specified. Please specify a table to edit.
\n"; exit; } //echo "" . implode(',',array_keys($_SESSION)) . "
\n"; //if (array_key_exists("editable-$tab",$_SESSION)) { echo "count=".count($_SESSION["editable-$tab"])."
\n"; } if(isset($_REQUEST['kill'])) { unset($_SESSION["editable-$tab"]); } if(isset($_REQUEST['save'])) { $rsp = savexCATchanges($tab,$_SESSION["editable-$tab"]); $errors = array(); if (getXmlErrors($rsp,$errors)) { echo "Tabrestore failed: ", implode(' ',$errors), "
\n"; } else { echo "Changes have been saved.
\n"; } } // Get table contents //$f = splitTableFields2('"node01","node02","5000","off",,'); echo ''; foreach ($f as $k => $v) { echo "$k=$v
"; } echo "
", getTabDescription($tab), " | \n"; echo "Column Descriptions |
Regular Expression Support |
Can't find header line in $tab
"); } echo "Add Row\n"; echo "Save\n"; echo "Cancel
\n"; ?> children() as $response) foreach ($response->children() as $line) { $line = (string) $line; if (ereg("^#", $line)) { $line = preg_replace('/^#/','', $line); $headers = explode(',', $line); return $headers; } } // If we get here, we never found the header line return NULL; } //----------------------------------------------------------------------------- function savexCATchanges($tab, & $editable){ $request = simplexml_load_string('addChild:$linestr.
\n"; $request->addChild('data', $linestr); } $request->addChild('table',$tab); $resp = submit_request($request, 0); return $resp; } //----------------------------------------------------------------------------- function getTabDescription($tab) { $xml = docmd('tabdump','',array('-d')); foreach ($xml->children() as $response) foreach ($response->children() as $line) { $line = (string) $line; if (ereg("^$tab:",$line)) { $line = preg_replace("/^$tab:\s*/", '', $line); return $line; } } return ''; } ?>