Guest User

Untitled

a guest
Jan 22nd, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  1. if (sizeof($fcv_array) > 0)
  2. {
  3. var_dump(sizeof($fcv_array));
  4. $this->pog_query .= " where ";
  5. //$this->pog_query .= " es_finance_masterid='".$_SESSION['eschools']['es_finance_masterid']."'";
  6. for ($i=0, $c=sizeof($fcv_array); $i<$c; $i++)
  7. {
  8. if (sizeof($fcv_array[$i]) == 1)
  9. {
  10. $this->pog_query .= " ".$fcv_array[$i][0]." ";
  11. continue;
  12. }
  13. else
  14. {
  15. if ($i > 0 && sizeof($fcv_array[$i-1]) != 1)
  16. {
  17. $this->pog_query .= " AND ";
  18. }
  19. if (isset($this->pog_attribute_type[$fcv_array[$i][0]]['db_attributes']) && $this->pog_attribute_type[$fcv_array[$i][0]]['db_attributes'][0] != 'NUMERIC' && $this->pog_attribute_type[$fcv_array[$i][0]]['db_attributes'][0] != 'SET')
  20. {
  21. if ($GLOBALS['configuration']['db_encoding'] == 1)
  22. {
  23. $value = POG_Base::IsColumn($fcv_array[$i][2]) ? "BASE64_DECODE(".$fcv_array[$i][2].")" : "'".$fcv_array[$i][2]."'";
  24. $this->pog_query .= "BASE64_DECODE(`".$fcv_array[$i][0]."`) ".$fcv_array[$i][1]." ".$value;
  25. }
  26. else
  27. {
  28. $value = POG_Base::IsColumn($fcv_array[$i][2]) ? $fcv_array[$i][2] : "'".$this->Escape($fcv_array[$i][2])."'";
  29. $this->pog_query .= "`".$fcv_array[$i][0]."` ".$fcv_array[$i][1]." ".$value;
  30. }
  31. }
  32. else
  33. {
  34. $value = POG_Base::IsColumn($fcv_array[$i][2]) ? $fcv_array[$i][2] : "'".$fcv_array[$i][2]."'";
  35. $this->pog_query .= "`".$fcv_array[$i][0]."` ".$fcv_array[$i][1]." ".$value;
  36. }
  37. }
  38. }
  39. }
  40. if ($sortBy != '')
  41. {
  42. if (isset($this->pog_attribute_type[$sortBy]['db_attributes']) && $this->pog_attribute_type[$sortBy]['db_attributes'][0] != 'NUMERIC' && $this->pog_attribute_type[$sortBy]['db_attributes'][0] != 'SET')
  43. {
  44. if ($GLOBALS['configuration']['db_encoding'] == 1)
  45. {
  46. $sortBy = "BASE64_DECODE($sortBy) ";
  47. }
  48. else
  49. {
  50. $sortBy = "$sortBy ";
  51. }
  52. }
  53. else
  54. {
  55. $sortBy = "$sortBy ";
  56. }
  57. }
  58. else
  59. {
  60. $sortBy = "es_adminsid";
  61. }
  62. $this->pog_query .= " order by ".$sortBy." ".($ascending ? "asc" : "desc")." $sqlLimit";
  63. $thisObjectName = get_class($this);
  64. $cursor = Database::Reader($this->pog_query, $connection);
  65. while ($row = Database::Read($cursor))
  66. {
  67. $es_admins = new $thisObjectName();
  68. //$es_admins->es_finance_masterid = $row['es_finance_masterid'];
  69. $es_admins->es_adminsId = $row['es_adminsid'];
  70. $es_admins->admin_username = $this->Unescape($row['admin_username']);
  71. $es_admins->admin_password = $this->Unescape($row['admin_password']);
  72. $es_admins->admin_fname = $this->Unescape($row['admin_fname']);
  73. $es_admins->user_type = $row['user_type'];
  74. $es_admins->user_theme = $this->Unescape($row['user_theme']);
  75. $es_admins->admin_lname = $this->Unescape($row['admin_lname']);
  76. $es_admins->admin_email = $this->Unescape($row['admin_email']);
  77. $es_admins->admin_phoneno = $this->Unescape($row['admin_phoneno']);
  78. $es_admins->admin_more = $this->Unescape($row['admin_more']);
  79. $es_admins->admin_permissions = $this->Unescape($row['admin_permissions']);
  80. $es_adminsList[] = $es_admins;
  81. }
  82. return $es_adminsList;
  83. }
Add Comment
Please, Sign In to add comment