SearchSurvey($searchString, $isActiveDb); if($matchingSurveys instanceof Admin_ErrorObject) { $message = 'Following error occured while searching for surveys: '.$matchingSurveys->errorDescription.''; } else if(count($matchingSurveys) == 0) { $message = 'No surveys that matched the search criteria were found.'; } } //do stuff only if Search button has been hit. if (array_key_exists('btnSearch', $_REQUEST)) { PerformSearch(); } else if(array_key_exists('btnUpdate', $_REQUEST)) { $surveysToHide = explode(',', trim($_REQUEST['surveysToHide'], ', ')); $surveysToUnhide = explode(',', trim($_REQUEST['surveysToUnhide'], ', ')); $retval = $biz->SetSurveyAvailability($surveysToHide, $surveysToUnhide); if($retval instanceof Admin_ErrorObject) { $message = 'Following error occured while saving to the database: '.$retval->errorDescription.''; } else if($retval === true) { $message = 'Changes were successfully saved to the database.'; } else { $message = 'Nothing to update.'; } PerformSearch(); } $biz->CloseDatabaseConnection(); ?> Carview | VRoom 360 (Un)Hide Surveys

Please find a survey that you wish to edit.

Search Survey:   
Search for surveys that contain these characters. Leave the field empty and hit Search to see all surveys.
Is Active: /> Yes /> No /> Does not matter
Search surveys which only users can see, cannot see or may or may not see.

0) echo " "; for($i = 0; $i< count($matchingSurveys); $i++) { $styleClass = $matchingSurveys[$i]['isActive'] === 0 ? 'inActive' : 'active'; $uiIndex = $i+1; $isActiveString = $matchingSurveys[$i]['isActive'] === 0 ? 'No' : 'Yes'; $surveyName = $matchingSurveys[$i]['name']; $surveyDbId = $matchingSurveys[$i]['id']; $btnText = $matchingSurveys[$i]['isActive'] === 0 ? 'Unhide' : '  Hide  '; echo " "; } if(count($matchingSurveys) > 0) echo "
Click the link in first column to go to the update page.
  Hit this button to save the changes you made anywhere in this page.
Survey Name Number of Questions Currently Active? Last Modified By Last Modified On Action
$surveyName ".$matchingSurveys[$i]['quesCount']." $isActiveString ".$matchingSurveys[$i]['modifiedBy']." ".date("F j, Y, g:i a", strtotime($matchingSurveys[$i]['modifiedOn']))."
  Hit this button to save the changes you made anywhere in this page.
"; ?>