Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. case "OnLoadWebDocument":
  2.  
  3. $postlink = explode('/',$_GET['q']);
  4.  
  5. $thispost = $modx->db->getValue($modx->db->query("SELECT pub_date FROM `modx_site_content` WHERE parent=5 AND alias='$postlink[1]'"));
  6.  
  7. $posts = $modx->db->query("SELECT alias, pub_date FROM `modx_site_content` WHERE parent=5 ORDER BY pub_date");
  8.  
  9. foreach($posts as $post){
  10.  
  11.  
  12. if($post['pub_date'] == $thispost){
  13.  
  14.  
  15.  
  16. }else{
  17.  
  18.  
  19.  
  20. }
  21.  
  22.  
  23. }
  24. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement