Fifth pass at adding key files
This commit is contained in:
		
							
								
								
									
										98
									
								
								site/retailers/wiki_validate.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										98
									
								
								site/retailers/wiki_validate.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,98 @@
 | 
			
		||||
<?PHP include("config.php");
 | 
			
		||||
 | 
			
		||||
if(!is_admin($user)){
 | 
			
		||||
  header('Location:'.$site_url.'/');
 | 
			
		||||
  exit();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Query to fetch non-validated retailers:
 | 
			
		||||
$results = mysql_query("SELECT edit_id, retailer_name, retailer_city, retailer_state, retailer_info, edit_timestamp, retailer_submitted_by, editor_user_id_fk FROM gforum_RetailersEdits ORDER BY edit_timestamp ASC");
 | 
			
		||||
 | 
			
		||||
// check to see if set is empty
 | 
			
		||||
$none = FALSE;
 | 
			
		||||
if (mysql_num_rows($results) == 0) { $none = TRUE; }
 | 
			
		||||
 | 
			
		||||
// set the page title
 | 
			
		||||
$pagetitle = "Admin: Retailer Edit Validation";
 | 
			
		||||
 | 
			
		||||
// set meta tags
 | 
			
		||||
$meta_keywords = "";
 | 
			
		||||
$meta_description = "";
 | 
			
		||||
?>
 | 
			
		||||
 | 
			
		||||
<? include("include_common_head.php"); ?>
 | 
			
		||||
<body class="listings">
 | 
			
		||||
  <? include($common_path . "/ads/ad_wallpaper.html"); ?>
 | 
			
		||||
 | 
			
		||||
  <div class="container">
 | 
			
		||||
    <? include($common_path . "/templates/include_header.php"); ?>
 | 
			
		||||
    <div class="main">
 | 
			
		||||
      <div class="contentwrapper clearfix">
 | 
			
		||||
        <? include("include_breadcrumb.php"); ?>
 | 
			
		||||
 | 
			
		||||
        <section class="section listings section-has-widgets section-static remove-sidebar">
 | 
			
		||||
          <div class="sidebar-b">
 | 
			
		||||
            <? include("include_sidebar.php"); ?>
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          <div class="content content-has-widgets">
 | 
			
		||||
            <div class="grid">
 | 
			
		||||
 | 
			
		||||
              <div class="clearfix">
 | 
			
		||||
                <h1><strong>Unvalidated Public Edits</strong></h1>
 | 
			
		||||
                <form method="post" action="wiki_validate_X.php"  enctype="multipart/form-data">
 | 
			
		||||
                    <?
 | 
			
		||||
                        if($none == TRUE){
 | 
			
		||||
                            echo "There are no edits waiting to be validated.";
 | 
			
		||||
                        }
 | 
			
		||||
                    ?>
 | 
			
		||||
                    <div class="dtable">
 | 
			
		||||
                    <? 
 | 
			
		||||
                    while($row = mysql_fetch_array($results)){
 | 
			
		||||
                        $arrEditors = mysql_fetch_array(mysql_query("SELECT user_username FROM gforum_User WHERE user_id = ".$row[editor_user_id_fk]." LIMIT 1"));
 | 
			
		||||
                        $editor_user_username = $arrEditors[user_username];
 | 
			
		||||
                        $boolEditorIsOwner = false;
 | 
			
		||||
                        if ($row[editor_user_id_fk] == $row[retailer_submitted_by]) { $boolEditorIsOwner = true; }
 | 
			
		||||
 | 
			
		||||
                    ?>
 | 
			
		||||
                        <div class="drow"><div class="dcell"><a class="sub-hdr" style="margin-left: 5px;" href="<? echo "wiki_view.php?edit_id=$row[edit_id]"; ?>"><? echo $row[retailer_name]; ?></a></div></div>
 | 
			
		||||
                        <div class="drow"><div class="dcell">Edited on: <? echo date("F j, Y", $row[edit_timestamp]); ?> by <? echo "<a href=\"http://forum.slowtwitch.com/gforum.cgi?username=".$editor_user_username.";\" target=\"_blank\">".$editor_user_username."</a>"; if ($boolEditorIsOwner) { echo " (original retailer submitter)"; } else { echo ""; } ?></div></div>
 | 
			
		||||
                        <div class="drow"><div class="dcell"><strong>Info:</strong> 
 | 
			
		||||
                        <? 
 | 
			
		||||
                            if(strlen($row[retailer_info]) > 400){
 | 
			
		||||
                            $phrase = "…"; }else{
 | 
			
		||||
                            $phrase = ""; }
 | 
			
		||||
                            
 | 
			
		||||
                            echo substr(htmlspecialchars(stripslashes($row[retailer_info])), 0, 160); 
 | 
			
		||||
                            echo $phrase; 
 | 
			
		||||
                        ?>
 | 
			
		||||
                        </div></div>
 | 
			
		||||
                        
 | 
			
		||||
                        <div class="drow">
 | 
			
		||||
                            <div class="dcell" style="border-bottom: 1px solid #a4a4a4">
 | 
			
		||||
                                <strong>Location:</strong> <? echo "$row[retailer_city], $row[retailer_state]"; ?><br />
 | 
			
		||||
                                <a class="nav" href="<? echo "wiki_view.php?edit_id=$row[edit_id]"; ?>">More information</a>
 | 
			
		||||
                                <br /><input type="checkbox" value="<? echo($row[edit_id]); ?>" name="validate[]"> Validate this edit. <input type="checkbox" value="<? echo($row[edit_id]); ?>" name="delete[]"> Delete this edit.<br />
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    <? } ?>
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <p>
 | 
			
		||||
                    <input type="submit" value="Process Selected Retailers" class="btn">
 | 
			
		||||
                    </p>
 | 
			
		||||
                </form>
 | 
			
		||||
                
 | 
			
		||||
              </div><!-- end col-2/3 -->
 | 
			
		||||
            </div><!-- end grid -->
 | 
			
		||||
          </div><!-- end content -->
 | 
			
		||||
        </section>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      </div><!-- end contentwrapper -->
 | 
			
		||||
    </div> <!-- end main -->
 | 
			
		||||
 | 
			
		||||
  <? include($common_path . "/templates/include_footer.php") ?>
 | 
			
		||||
  </div> <!-- container  -->
 | 
			
		||||
</body>
 | 
			
		||||
<? include($common_path . "/templates/include_global_js.php") ?>
 | 
			
		||||
</html>
 | 
			
		||||
		Reference in New Issue
	
	Block a user