Jump to content

buildakicker

Members
  • Posts

    44
  • Joined

  • Last visited

    Never

Everything posted by buildakicker

  1. Ok, did a little change.. .but this works. Thanks to the web! Added input names like so: name="request['+fields+'][Full Path of folder to change access:]" Added a number to them each time the user wanted to add a new field... Then processed them like so: $a=$_REQUEST['request']; foreach ($a as $value1) { foreach ($value1 as $k => $value2) { $note.= $k; $note.= $value2; } } Example ---- $k returns: Full Path of folder to change access: $value2 returns user input
  2. I ran into an interesting issues... this foreach will return the first added field correctly, however it will not add a 2nd or 3rd field with the data from the addQues(); For example: First Result: Full Path of folder to change access: t:\this-drive User Permission Group to be changed: dv group Additional users requiring read access: jfla Additional users requiring author access: azann Users to be removed from access: dlint Data Steward, Program Manager, Project Lead, or Supervisor who can authorize access changes: gpone Phone number of approving official: 888-888-7777 Second: i:\new i group urusa mmalone jjon yokis 888-999-555 Third: u:\ u group phammer midnite bmarley gdead 777-444-2222 ect... Any suggestions?
  3. this worked thanks... $addQues = array( "Full Path of folder to change access:", "User Permission Group to be changed:", "Additional users requiring read access:", "Additional users requiring author access:", "Users to be removed from access:", "Data Steward, Program Manager, Project Lead, or Supervisor who can authorize access changes:", "Phone number of approving official:", ); foreach($a as $k => $value) { echo "$addQues[$k] $value <br />"; }
  4. Hi, thanks for the response. They already have name: name="addfield[]" I get them in the array no problem, my issue is putting text before each of the results I am echoing out. Thanks
  5. I have a form: <fieldset> <legend>Request Access Change(s) To Exisiting Folder</legend> <div class="topinfo"> <p><span class="required">* Required Fields</span></p> </div> <label for="fullpath"><span class="required">*Full Path of folder to change access:</span></label> <input name="fullpath" id="it10" type="text" size="50" maxlength="50" /> <br /> <small>Example: j://this/is/my/folder</small><br /> <div class="bgdiff"> <label for="userpermissiongroup">User Permission Group to be changed:</label> <input name="userpermissiongroup" type="text" id="it11" size="50" maxlength="50" /> <small>If Known...</small></div> <br /> <label for="addreadaccess">Additional users requiring read access:</label> <input name="addreadaccess" type="text" id="it12" size="15" maxlength="15" /> <br /> <small>AD Username</small><br /> <div class="bgdiff"> <label for="addauthoraccess">Additional users requiring author access:</label> <input name="addauthoraccess" type="text" id="it13" size="12" maxlength="12" /> <br /> <small>AD Username</small></div> <br /> <label for="removeaccess">Users to be removed from access:</label> <input name="removeaccess" type="text" id="it14" size="12" maxlength="12" /> <br /> <small>AD Username</small><br /> <div class="bgdiff"> <label for="supervisor"><span class="required">*Data Steward, Program Manager, Project Lead, or Supervisor who can authorize access changes:</span></label> <input name="supervisor" type="text" id="it15" size="30" maxlength="30" /> <br /> <small>AD Username</small></div> <br/> <label for="phoneapprover"><span class="required">*Phone number of approving official: </span></label> <input name="phoneapprover" type="text" id="it16" size="30" maxlength="30" /> <br /> <small>999-999-9999</small><br /> <!-- id to adding more fields on demand to ---> <div id="addmore"></div> <input type="button" onClick="addInput()" name="add" value="Add More Requests" /> </fieldset> On Submit, this form calls a php script that just takes all these fields and echos them out for me to see for now. I would like to add the ability to add this whole fieldset again, if the user would like on click. I have a javascript "addInput()" function that just adds all these fields again: var fields = 0; function addInput() { /*if (addfields != 5) {*/ document.getElementById('addmore').innerHTML += '<hr /><p align="center" class="redtext" id="top'+fields+'">------------ ADD NEXT ACCESS CHANGE REQUEST BELOW ------------</p>'; document.getElementById('addmore').innerHTML += '<label for="fullpath" id="fauxtop"><span class="required">*Full Path of folder to change access:</span></label><input name="addfield[]" id="it10-' + fields + '" type="text" size="50" maxlength="50" /><br /><small>Example: j:\\this\\new\\folder\\</small><br />'; document.getElementById('addmore').innerHTML += '<div class="bgdiff"><label for="userpermissiongroup">User Permission Group to be changed:</label><input name="addfield[]" id="it11-' + fields + '" type="text" size="50" maxlength="50" /><small>If Known...</small></div><br />'; document.getElementById('addmore').innerHTML += '<label for="addreadaccess">Additional users requiring read access:</label><input name="addfield[]" id="it12-' + fields + '" type="text" size="15" maxlength="15" /><br /><small>AD Username</small><br />'; document.getElementById('addmore').innerHTML += '<div class="bgdiff"><label for="addauthoraccess">Additional users requiring author access:</label><input name="addfield[]" id="it13-' + fields + '" type="text" size="12" maxlength="12" /><br /><small>AD Username</small></div><br />'; document.getElementById('addmore').innerHTML += '<label for="removeaccess">Users to be removed from access:</label><input name="addfield[]" id="it14-' + fields + '" type="text" size="12" maxlength="12" /><br /><small>AD Username</small><br />'; document.getElementById('addmore').innerHTML += '<div class="bgdiff"><label for="supervisor"><span class="required">*Data Steward, Program Manager, Project Lead, or Supervisor who can authorize access changes:</span></label><input name="addfield[]" id="it15-' + fields + '" type="text" size="30" maxlength="30" /><br /><small>AD Username</small></div><br/>'; document.getElementById('addmore').innerHTML += '<label for="phoneapprover"><span class="required">*Phone number of approving official: </span></label><input name="addfield[]" id="it16-' + fields + '" type="text" size="30" maxlength="30" /><br /><small>999-999-9999</small><br />'; fields += 1; } I have been using a foreach loop to display the form inputs: foreach($_REQUEST['addfield'] as $value) { echo "$value <br />"; } I would like to have each of the fields display the $value and have information before each like so: Full Path of folder to change access: $value; User Permission Group to be changed: $value; That is where my problem is... seems simple, but I am not getting it to work. Thanks for any help!
  6. hi all, i am trying to just get a couple things from this RSS feed: http://www.sierraavalanchecenter.org/bottomline-rss.php I would like to grab the danger rose image on the left, the text that tells of the Avalanche danger ie... "Avalanche Danger Remains LOW..." and the date. I have tried using a few things like: $html = 'http://www.sierraavalanchecenter.org/bottomline-rss.php'; $dom = new DOMDocument; $dom->loadHTML($html); $xpath = new DOMXPath($dom); $res = $xpath->query('//div[@id=dangericon]'); if ($res->item(0) !== NULL) { $test = $res->item(0)->nodeValue; } ...without any luck. Anyone have some advice for me? thanks!
  7. Hi all, I have a strange issue going on. It may be server related, but I don't know what to look for. I have a .php page with a few Virtual Includes: <?php virtual ("nav.shtml"); ?> ...throughout it. I have also a parser that is displaying XML data in a table form. The parser works with the standard: <?php include ('parser.php'); ?> ...however, if I have the Virtual above the include, the parser doesn't work. Or at least it will not "find the file" however, the file is there and it works ABOVE the virtual, displaying it fine... For example, this works: <?php include ('parser.php'); ?> <?php virtual ('file.shtml'); ?> This doesn't: <?php virtual ('file.shtml'); ?> <?php include ('parser.php'); ?> Any thoughts?
  8. Hi, I have echoed out the results and they show just fine. When the XLS file comes up, all I get is the geo_area field and 45 rows with 1-45 numbers in it. However, there should be multiple columns and rows...
  9. I have a simple question I thought... but I am not able to get it to work. I have an oracle select statement: select geo_area, oct_projects, oct_work_perf from metrics_parea_geo_trends Order by geo_area It works fine with SLQ+, so I know it's a good statement. When I try to export it to an excel spreadsheet using Spreadsheet_Excel_Writer() I get only the first field, geo_area and the total rows returned in the first column. This was working no problem on php4, however, we moved to php5 and now there is this issue. $select ="select ".$spiece." from metrics_parea_geo_trends Order by geo_area"; //THIS WORKS in SQL PLUS: select geo_area, oct_projects, oct_work_perf from metrics_parea_geo_trends Order by geo_area; $trends = $DB->select($con,$select); $DB->logOff($con); $fname = tempnam("/tmp", "Geographic_Area_Trend.xls"); $xls = & new Spreadsheet_Excel_Writer($fname); $xls->send("Geographic_Area_Trend.xls"); $sheet = & $xls->addWorksheet('Binary Count'); // Write some numbers for ( $i=0;$i<11;$i++ ) { // Use PHP's decbin() function to convert integer to binary $sheet->write($i,0,decbin($i)); } // Finish the spreadsheet, dumping it to the browser $xls->close(); I have tried other simple export to xls, but nothing is working. I am stumped! Any clues?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.