Testing taxonomy_form_all()
"; /* $bobo = taxonomy_form_all(); foreach ($bobo as $key => $value){ echo $key."=".$value."
"; $bobo2 = $bobo[$key]; foreach ($bobo2 as $key => $value){ echo "-".$key."=".$value."
"; } } */ print "
Testing taxonomy_form()
"; /* print_R (taxonomy_form(16)); */ /******************************************************************/ //sets up an array for capturing incoming Post variables $incoming = array ( 'user_name', 'node_type', 'modify_type', 'category_type', 'search_words', 'list_no', 'submit_yes' ); //This for loop puts all incoming vars (if they exist) into $info array for ($i=0; $i
'."\n\r"; print $djm_search_form; } ?> USER ID =".$node_author.""; //testing //declare other incoming vars $node_type = $info['node_type']; $modify_type = $info['modify_type']; $category_type = $info['category_type']; $search_words = $info['search_words']; $list_no = $info['list_no']; //print out form with the incoming vars print_djm_search_form($user_name, $node_type, $modify_type, $category_type, $search_words, $list_no); //array to set the appropriate sql query and echo information based on the modify_type selected $modify_options = array ( 'select' => array ( 'modified'=>"node.title, node.type, node.nid, node.uid, node.created, node.changed, node_revisions.uid", 'created'=>"node.title, node.type, node.nid, node.uid, node.created, node.changed, node_revisions.uid, node_revisions.nid", 'either'=>'created or updated' ), 'where' => array ( 'modified'=>"node_revisions.uid = $node_author AND node.status = 1 AND node_revisions.timestamp = node.changed ORDER BY node.changed", 'created'=>"node.uid = $node_author AND node.nid = node_revisions.nid AND node.status =1 ORDER BY node.created", 'either'=>'created or updated' ), 'echo_what' => array ('modified'=>'has updated','created'=>'has created','either'=>'has created or updated'), 'echo_list' => array ( 'modified'=>"» ".l($anode->title, "node/$anode->nid")."
Last Updated by ".$user_name.": ".$changed."
created by ".$username.": ".$created."
created by ".$username.": ".$created."
", 'created'=>"» ".l($anode->title, "node/$anode->nid")."
Created by ".$user_name.": ".$created."
last Updated by ".$username.": ".$changed."
last Updated by ".$username.": ".$changed."
", 'either'=>'created or updated' ) ); //set the var for the select portion of the query $modify_select = $modify_options['select'][$modify_type]; //set the var for the extended set of the where portion of the query $modify_where = $modify_options['where'][$modify_type]; //set the var for appopriate print of what looking for $modify_echo = $modify_options['echo_what'][$modify_type]; //set the var for appopriate info of what looking for in the listing $modify_list = $modify_options['echo_list'][$modify_type]; //Query final set up $sql = "SELECT $modify_select FROM {node, node_revisions} WHERE node.type = '$node_type' AND $modify_where LIMIT $list_no"; print "
SQL = ".$sql."
"; //testing //initialize the $output var $output .= ""; //query the db $result = db_query($sql); print_r(db_fetch_array($result)); //testing while ($anode = db_fetch_object($result)) { $this_uid = $anode->uid; $this_user = db_fetch_array(db_query('SELECT name FROM {users} WHERE uid = %d', $this_uid)); $username = $this_user['name']; $created = date('r', $anode->created); $changed = date('r', $anode->changed); $output .= $modify_list; } print "Content ".$user_name." ".$modify_echo."
"; print "Content type = ".$node_type." | "; print "Listing = 1-".$list_no."
"; $output .= ""; print $output; } else { //clear $output var unset ($output); //get the user information global $user; $uid = $user->uid; $my_name = $user->name; $node_author = $uid; //set of static initial vars $node_type = "page"; $modify_type = "modfied"; //only used by form $category_type = ""; //only used by form $search_words = ""; //only used by form $list_no = "10"; //print form based on vars print_djm_search_form($my_name, $node_type, $modify_type, $category_type, $search_words, $list_no); //SQL query of items modified $sql = "SELECT node.title, node.type, node.nid, node.uid, node.created, node.changed FROM {node, node_revisions} WHERE node.type = '$node_type' AND node_revisions.uid = '$node_author' AND node.status = 1 AND node_revisions.timestamp = node.changed ORDER BY node.changed DESC LIMIT $list_no"; $output .= ""; $result = db_query($sql); while ($anode = db_fetch_object($result)) { $this_uid = $anode->uid; $this_user = db_fetch_array(db_query('SELECT name FROM {users} WHERE uid = %d', $this_uid)); $username = $this_user['name']; $created = date('r', $anode->created); $changed = date('r', $anode->changed); $output .= "» ".l($anode->title, "node/$anode->nid")."
Last Updated by ".$my_name.": ".$changed."
created by ".$username.": ".$created."
created by ".$username.": ".$created."
"; } print "
Content ".$my_name." has updated
"; print "Content type = Page | "; print "Listing = 1-".$list_no."
"; $output .= ""; print $output; } ?>