Guest User

Untitled

a guest
Feb 16th, 2015
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. $datastructure_uid = 0;
  2. $startpage = 1;
  3.  
  4. while($datastructure_uid == 0 && $search_uid != 0) {
  5.   $findit = mysql_query("SELECT pid, tx_templavoila_ds, tx_templavoila_next_ds FROM pages WHERE uid = $search_uid");
  6.   if(mysql_num_rows($findit)>=1) {
  7.     !$startpage ? $datastructure_uid = mysql_result($findit, 0, 2) : $startpage = 0;
  8.     if($datastructure_uid == 0) $datastructure_uid = mysql_result($findit, 0, 1);
  9.     if($datastructure_uid != 0) {
  10.       $datastructure = mysql_query("SELECT dataprot FROM tx_templavoila_datastructure WHERE uid = $datastructure_uid");
  11.       if(mysql_num_rows($datastructure) >= 1) {
  12.         $dataprod = mysql_result($datastructure, 0, 0);
  13.         $xmlstructure = t3lib_div::xml2array($dataprod);
  14.         return $xmlstructure['ROOT']['dbttvdata'][$search_dbttvfield];
  15.       }
  16.     }
  17.     $search_uid = mysql_result($findit, 0, 0);
  18.   }
  19.   else {
  20.     $search_uid = 0;
  21.   }
  22. }
  23. return '';
Advertisement
Add Comment
Please, Sign In to add comment