Advertisement
| 10.07.2008 at 03:02PM PDT, ID: 23795531 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: |
<?php
mysql_select_db($database_home_conn, $home_conn);
$query_rsVolunteer = "SELECT * FROM volunteer";
$rsVolunteer = mysql_query($query_rsVolunteer, $home_conn) or die(mysql_error());
$row_rsVolunteer = mysql_fetch_assoc($rsVolunteer);
$totalRows_rsVolunteer = mysql_num_rows($rsVolunteer);
//Export to Excel Server Behavior
if (isset($_POST['vold'])&&($_POST['vold']=="2")){
$delim="";
$delim_replace="";
if($delim==""){
$lang=(strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'],",")===false)?$_SERVER['HTTP_ACCEPT_LANGUAGE']:substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'],","));
$semi_array=array("af","zh-hk","zh-mo","zh-cn","zh-sg","zh-tw","fr-ch","de-li","de-ch","it-ch","ja","ko","es-do","es-sv","es-gt","es-hn","es-mx","es-ni","es-pa","es-pe","es-pr","sw");
$delim=(in_array($lang,$semi_array) || substr_count($lang,"en")>0)?",":";";
}
$output="";
$include_hdr="1";
if($include_hdr=="1"){
$totalColumns_rsVolunteer=mysql_num_fields($rsVolunteer);
for ($x=0; $x<$totalColumns_rsVolunteer; $x++) {
if($x==$totalColumns_rsVolunteer-1){$comma="";}else{$comma=$delim;}
$output = $output.(ereg_replace("_", " ",mysql_field_name($rsVolunteer, $x))).$comma;
}
$output = $output."\r\n";
}
do{$fixcomma=array();
foreach($row_rsVolunteer as $r){array_push($fixcomma,ereg_replace($delim,$delim_replace,$r));}
$line = join($delim,$fixcomma);
$line=ereg_replace("\r\n", " ",$line);
$line = "$line\n";
$output=$output.$line;}while($row_rsVolunteer = mysql_fetch_assoc($rsVolunteer));
header("Content-Type: application/xls");
header("Content-Disposition: attachment; filename=report.csv");
header("Content-Type: application/force-download");
header("Cache-Control: post-check=0, pre-check=0", false);
echo $output;
die();
}
?>
volunteerD table...
<?php
mysql_select_db($database_home_conn, $home_conn);
$query_rsVolunteer = "SELECT ID_vol_vod AS Volunteer_ID, position1_vod AS Position_1, position2_vod AS Position_2, position3_vod AS Position_3, position4_vod AS Position_4, position5_vod AS Position_5, position6_vod AS Position_6, position7_vod AS Position_7, position8_vod AS Position_8, day1_vod AS Day_1, day2_vod AS Day_2, day3_vod AS Day_3, day4_vod AS Day_4, day5_vod AS Day_5, day6_vod AS Day_6, day7_vod AS Day_7, day8_vod AS Day_8, day9_vod AS Day_9, day10_vod AS Day_10, comment_vod AS Comment, date_vod AS Submitted_On FROM volunteerD";
$rsVolunteer = mysql_query($query_rsVolunteer, $home_conn) or die(mysql_error());
$row_rsVolunteer = mysql_fetch_assoc($rsVolunteer);
$totalRows_rsVolunteer = mysql_num_rows($rsVolunteer);
//Export to Excel Server Behavior
if (isset($_POST['export'])&&($_POST['export']=="1")){
$delim="";
$delim_replace="";
if($delim==""){
$lang=(strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'],",")===false)?$_SERVER['HTTP_ACCEPT_LANGUAGE']:substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'],","));
$semi_array=array("af","zh-hk","zh-mo","zh-cn","zh-sg","zh-tw","fr-ch","de-li","de-ch","it-ch","ja","ko","es-do","es-sv","es-gt","es-hn","es-mx","es-ni","es-pa","es-pe","es-pr","sw");
$delim=(in_array($lang,$semi_array) || substr_count($lang,"en")>0)?",":";";
}
$output="";
$include_hdr="1";
if($include_hdr=="1"){
$totalColumns_rsVolunteer=mysql_num_fields($rsVolunteer);
for ($x=0; $x<$totalColumns_rsVolunteer; $x++) {
if($x==$totalColumns_rsVolunteer-1){$comma="";}else{$comma=$delim;}
$output = $output.(ereg_replace("_", " ",mysql_field_name($rsVolunteer, $x))).$comma;
}
$output = $output."\r\n";
}
do{$fixcomma=array();
foreach($row_rsVolunteer as $r){array_push($fixcomma,ereg_replace($delim,$delim_replace,$r));}
$line = join($delim,$fixcomma);
$line=ereg_replace("\r\n", " ",$line);
$line = "$line\n";
$output=$output.$line;}while($row_rsVolunteer = mysql_fetch_assoc($rsVolunteer));
header("Content-Type: application/xls");
header("Content-Disposition: attachment; filename=volunteer_report.csv");
header("Content-Type: application/force-download");
header("Cache-Control: post-check=0, pre-check=0", false);
echo $output;
die();
}
?>
And volunteerC table....
<?php
mysql_select_db($database_home_conn, $home_conn);
$query_rsVolc = "SELECT * FROM volunteerC";
$rsVolc = mysql_query($query_rsVolc, $home_conn) or die(mysql_error());
$row_rsVolc = mysql_fetch_assoc($rsVolc);
$totalRows_rsVolc = mysql_num_rows($rsVolc);
//Export to Excel Server Behavior
if (isset($_POST['volc'])&&($_POST['volc']=="3")){
$delim="";
$delim_replace="";
if($delim==""){
$lang=(strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'],",")===false)?$_SERVER['HTTP_ACCEPT_LANGUAGE']:substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'],","));
$semi_array=array("af","zh-hk","zh-mo","zh-cn","zh-sg","zh-tw","fr-ch","de-li","de-ch","it-ch","ja","ko","es-do","es-sv","es-gt","es-hn","es-mx","es-ni","es-pa","es-pe","es-pr","sw");
$delim=(in_array($lang,$semi_array) || substr_count($lang,"en")>0)?",":";";
}
$output="";
$include_hdr="1";
if($include_hdr=="1"){
$totalColumns_rsVolc=mysql_num_fields($rsVolc);
for ($x=0; $x<$totalColumns_rsVolc; $x++) {
if($x==$totalColumns_rsVolc-1){$comma="";}else{$comma=$delim;}
$output = $output.(ereg_replace("_", " ",mysql_field_name($rsVolc, $x))).$comma;
}
$output = $output."\r\n";
}
do{$fixcomma=array();
foreach($row_rsVolc as $r){array_push($fixcomma,ereg_replace($delim,$delim_replace,$r));}
$line = join($delim,$fixcomma);
$line=ereg_replace("\r\n", " ",$line);
$line = "$line\n";
$output=$output.$line;}while($row_rsVolc = mysql_fetch_assoc($rsVolc));
header("Content-Type: application/xls");
header("Content-Disposition: attachment; filename=report.csv");
header("Content-Type: application/force-download");
header("Cache-Control: post-check=0, pre-check=0", false);
echo $output;
die();
}
?>
|
Advertisement