submission -> advice $article_code = $_REQUEST['article_code'] ; $submission_code = $_REQUEST['submission_code'] ; $total_rating = 0 ; $rating_count = 0 ; $rating_average = 0 ; $delicious_link = "http://www.anonymousemployee.com/csssite/sidelinks/submission_details.php%2Farticle_code=$article_code%2Fsubmission_code=$submission_code" ; function next_link() { //find out what the last article is so that we dont go past it with our "next" $article_code = $_REQUEST['article_code'] ; $submission_code = $_REQUEST['submission_code'] ; $next_submission = $submission_code + 1 ; $links_array = array() ; $last_submission_cur = mysql_query("SELECT * FROM submission WHERE article_code = '$article_code' AND visible = '1' "); while( $row=mysql_fetch_row( $last_submission_cur ) ) { $nbrow++; $last_submission = $row[4]; //echo "last submission is $last_submission
" ; } if ($submission_code == $last_submission) { $next_submission = 1 ; //echo "next submission is 1
" ; } else { //echo "sub code = $submission_code AND last code = $last_submission
" ; for ($i = $submission_code ; $i <= $last_submission; $i++ ) { $cur = mysql_query("SELECT * FROM submission WHERE article_code = '$article_code' AND submission_code > $submission_code AND visible = '1' "); while( $row=mysql_fetch_row( $cur ) ) { $nbrow++; $submission_code = $row[4]; //echo "submission code = $submission_code " ; array_push($links_array,$submission_code) ; $next_submission = $links_array[0] ; //echo "i = $i
" ; } } } $next_submission_link = 'submission_details.php?article_code=' . $article_code .'&submission_code=' . $next_submission ; $next_linka = "See the next submission" ; echo "$next_linka" ; echo $next_submission_link ; echo "$next_linkc" ; } // get the article / submission info $cur = mysql_query("SELECT * FROM submission WHERE article_code = '$article_code' AND submission_code = '$submission_code' "); while( $row=mysql_fetch_row( $cur ) ) { $nbrow++; $article_description = $row[2]; $submission_short = $row[5]; $submission_long = $row[6]; // show the paragraphs $submission_long = preg_replace('/(?)\n/', "
\n", $submission_long); $submission_owner = $row[7]; $submission_rating = $row[8]; //echo "submission rating is $submission_rating
" ; $visible = $row[11]; $anonymous = $row[15]; } // thats all fine and dandy, but what if the submission isnt approved yet and some hacker wants to see it? if ( $visible != 1) { $submission_long = "I am sorry, this article has not been approved for viewing yet. Please try back later." ; $submission_owner = "anonymous" ; $not_visible = 'n' ; } // respect their wishes to remain anonymous if ( $anonymous == 'yes') { $submission_owner = "anonymous" ; } //get the average rankings on this submission $cur1 = mysql_query("SELECT * FROM submission_rating WHERE article_code = '$article_code' AND submission_code = '$submission_code' "); while( $row=mysql_fetch_row( $cur1 ) ) { $nbrow++; $rating = $row[3]; $total_rating = $total_rating + $rating ; $rating_count = $rating_count + 1 ; } if ($rating_count < '1' ) { $rating_count = 1 ; } ; $rating_average = $total_rating / $rating_count ; $rating_average = substr($rating_average,0,1) ; //echo "total rating is $total_rating and count is $rating_count and rating average is $rating_average
" ; // this will pull out a mediator from this page who has already provided advice $cur = mysql_query("SELECT * FROM advice WHERE article_code = '$article_code' AND submission_code = '$submission_code' AND visible = '1' AND owner_type = 'mediator' "); $array_advices = array(); while( $row=mysql_fetch_row( $cur ) ) { $advice_owner = $row[5]; array_push($array_advices,$advice_owner) ; $nbrow++; } $array_count = count($array_advices) ; if ($array_count != '' ) { $mediator_badge = 'yes' ; } if ($array_count != '' ) { $rand_mediator_count = array_rand($array_advices, 1); } $rand_mediator = $array_advices[$rand_mediator_count] ; // echo "random mediator is: $rand_mediator
" ; // now we have the mediator. lets see what their details are. $cur = mysql_query("SELECT * FROM mediators WHERE law_code = '$rand_mediator' "); while( $row=mysql_fetch_row( $cur ) ) { $law_first = $row[2]; $law_website = $row[15]; $helper_type = $row[26]; $law_thumbnail = $row[28]; $marketing_visible = $row[31]; $nbrow++; if ($marketing_visible == '1') { $top_contact_mediator = "Contact: $law_first " ; } } if ($law_website != '') { $top_law_website = "Visit my website" ; $top_law_website_link = "
$top_law_website
" ; } function advice_full() { $article_code = $_REQUEST['article_code'] ; $submission_code = $_REQUEST['submission_code'] ; $owner_type = '' ; //$rating_average = $total_rating / $rating_count ; $row = 0 ; $cur2 = mysql_query("SELECT * FROM advice WHERE article_code = '$article_code' AND submission_code = '$submission_code' AND visible = '1' ORDER BY rating DESC"); while( $row=mysql_fetch_row( $cur2 ) ) { $nbrow++; $advice_code = $row[3]; $advice = $row[4]; // all the paragraphs back into it $advice = preg_replace('/(?)\n/', "
\n", $advice); $advice_owner = $row[5]; $advice_rating = $row[7]; $owner_type = $row[11]; $advice_rating = substr($advice_rating,0,1) ; $advice_header1 = "
A visitor of this site offers this as a possible solution...
" ; $advice_header = "
$advice_header1
" ; //give the mediator credit by allowing a pop-up for their name, and show their helper type if ($advice_owner == '') { $advice_owner = 'Contributor: visitor' ; } if ($owner_type == 'mediator') { $cur4 = mysql_query("SELECT * FROM mediators WHERE law_code = '$advice_owner' "); while( $row=mysql_fetch_row( $cur4 ) ) { $nbrow++; $helper_type = $row[26]; $marketing_visible = $row[31] ; } if ($marketing_visible == '1') { $advice_owner = " Contributor: $helper_type \"Contact " ; } else { $advice_owner = " Contributor: $helper_type" ; } } // echo "advice rating is $advice_rating
" ; // if we can get the oprion to be preselected, then great. if ($advice_rating == '1') {$opt1 = "selected=\"selected\"" ;} ; if ($advice_rating == '2') {$opt2 = "selected=\"selected\"" ;} ; if ($advice_rating == '3') {$opt3 = "selected=\"selected\"" ;} ; if ($advice_rating == '4') {$opt4 = "selected=\"selected\"" ;} ; if ($advice_rating == '5') {$opt5 = "selected=\"selected\"" ;} ; if ($advice_rating == '6') {$opt6 = "selected=\"selected\"" ;} ; if ($advice_rating == '7') {$opt7 = "selected=\"selected\"" ;} ; if ($advice_rating == '8') {$opt8 = "selected=\"selected\"" ;} ; if ($advice_rating == '9') {$opt9 = "selected=\"selected\"" ;} ; //if ($advice_rating = '10') {$opt10 = "selected=\"selected\"" ;} ; $advice_form = "
$advice_owner
How helpful is this?:
" ; $advice_full = "$advice_header $advice
$advice_form " ; // try to build the table first so that each is self-contained with a border echo "
$advice_full


"; //echo "$advice_full " ; } } ?> <? if ($submission_short != '') { echo "$submission_short" ; } else { echo "Get help with $article_description. Learn what you can do." ; } ?>
">
   
 
Meet:
$law_first
 
 
She is a Professional
$helper_type who
provides advice for this page.
$top_law_website_link
$top_contact_mediator
" ; } ?>

Anonymous Employee User Forum

 

 
">
Send this page to a friend Send this page to a friend
 
Ask a question Post a Question to the Forum
 
Suggest Advice Suggest advice for this problem

Can you help this person? They have a problem with
$article_description " ; ?> and need some advice.

 

This is the original problem from an employee...
 
   
Employee:
Rate This: (Higher = Better) " ; // if we can get the oprion to be preselected, then great. if ($submission_rating == '1') {$opt1 = "selected=\"selected\"" ;} else {$opt1 = "" ;}; if ($submission_rating == '2') {$opt2 = "selected=\"selected\"" ;} else {$opt2 = "" ;}; if ($submission_rating == '3') {$opt3 = "selected=\"selected\"" ;} else {$opt3 = "" ;}; if ($submission_rating == '4') {$opt4 = "selected=\"selected\"" ;} else {$opt4 = "" ;}; if ($submission_rating == '5') {$opt5 = "selected=\"selected\"" ;} else {$opt5 = "" ;}; if ($submission_rating == '6') {$opt6 = "selected=\"selected\"" ;} else {$opt6 = "" ;}; if ($submission_rating == '7') {$opt7 = "selected=\"selected\"" ;} else {$opt7 = "" ;}; if ($submission_rating == '8') {$opt8 = "selected=\"selected\"" ;} else {$opt8 = "" ;}; if ($submission_rating == '9') {$opt9 = "selected=\"selected\"" ;} else {$opt9 = "" ;}; //if ($advice_rating = '10') {$opt10 = "selected=\"selected\"" ;} ; ?>

 

 
 
 
Do you have some advice that can help this person?
Do you have a problem you would like advice for?

Disclaimer: The advice displayed within this site is not legal advice and is not to be taken as legal or professional advice in any way. Any communication within this forum is intended only to discuss a number of possible options. All ratings have come from site visitors and reflect a peer review only.

 

add to del.icio.us
add to Del.icio.us" ; $digg_url = "http://digg.com/submit?phase=2&url=http%3A//www.anonymousemployee.com/csssite/sidelinks/submission_details.php%3Farticle_code%3D$article_code%3Dsubmission_code=$submission_code&title=Get%20help%20with%20$article_description%20-%20Learn%20what%20you%20can%20do" ; ?>  
add this page as a link in digg
add to digg