hi all,
iam a new guest in drupal world...i tried to develop some modules that may contain a view for admin as (back end view) like edit ,add,delete and some things like that....and another view for users as (Front end view) where user can access only and they can't modify the contents they see...so i used to make 2 separate folders that i usually name the user one as user_module and the admin one as admin_module and write the code inside ...my question is ...can i write the code that related to admin and the code that related to user both @ one file instead of create 2 modules...

here is 2 files

admin one
**********


<?
function  request_end_block($op = 'list', $delta = 0, $edit = array()) 
{  

if ($op == "list")
 {
    // Generate listing of blocks from this module, for the admin/block page
    $block = array();
    $block[0]["info"] = t('Manage Pending Requests');
    return $block;
  } 
   
else if ($op == 'view') 
{ 

if($_GET['actionName']=="delete") 
	{
	 $query3 = "delete from requests where id='".$_GET['del']."'";
	  $queryResult3 = db_query($query3);
	  if($queryResult3) 
	  {
	  drupal_set_message(t("Deleted ok"));
	  }
	}

  $block_content.='<form name="f1" action="" method="get">';
	

      
		 $block_content .='<table  border=3>';
		 
		$query = "SELECT * FROM requests ";
        $queryResult =  db_query($query);
		while ($arr = db_fetch_object($queryResult)) 
          {
			
			$block_content .='<tr>';
			$block_content .='<td><input type="textbox"  value="'.$arr->name.'" ></td>';
			$block_content .='<td><input type="textbox"  value="'.$arr->v_date.'" ></td>';
			$block_content .='<td><input type="textbox"  value="'.$arr->v_price.'" ></td>';
			$block_content .='<td><input type="textbox"  value="'.$arr->status.'" ></td>';
			$block_content .='<td><a href="'.$_SERVER['REQUEST_URI'].'&actionName=delete&del='.$arr->id.'">Delete</td>';
			$block_content .=   '</tr>';  	
		  }

		$block_content .=   '</table>';  
		
		
		
   $block_content.='</form>';
   $block_content.='</html>';
   

   
   if ($block_content == '') 
		{    
			/* No content from a week ago.  If we return nothing, the block   
			 * doesn't show, which is what we want. 
			 */
			return;
		}

  // set up the block  
  $block = array();
  $block['subject'] = 'Manage Pending Requests';  
  $block['content'] = $block_content;
 
  return $block;

}

  


} // end function 

?>

the front one "user"


<?php
function request_perm() {
return array('admin', 'user');
}


function request_menu() {
  $items['request/form'] = array(
    'title' => t('ADD New request'),
    'page callback' => 'request_form',
    'access arguments' => array('admin', 'user'),
    'description' => t('ADD New request'),
    'type' => MENU_CALLBACK,
  );
  
  $items['request/pending'] = array(   //add the new menu item
    'title' => t('Show Pending Request'),
    'page callback' => 'request_form_2', //call new form function
    'access arguments' => array('admin'),
    'type' => MENU_CALLBACK,
  );

  return $items;
}

 


function request_form() {
 
      return drupal_get_form('request_my_form');
	  }
	function request_form_2() {
  return drupal_get_form('show_pending_request');
}

   
function request_my_form($form_state) {

  $form['requestinfo'] = array(
    '#type' => 'fieldset',
    '#title' => t('Request Info'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
  );
	  
  $form['requestinfo']['first'] = array(
    '#type' => 'textfield',
    '#title' => t('Name'),
    '#default_value' => $GLOBALS[user]->name, // changed
    '#description' => "Please enter your name.",
    '#size' => 20,
    '#maxlength' => 20,
  );
	 
	$form['requestinfo']['vdate'] = array(
    '#type' => 'textfield',
    '#title' => t('Vacation Date'),
    '#default_value' => $form_state['values']['vdate'], // changed
    '#description' => "Please enter Date.",
    '#size' => 20,
    '#maxlength' => 20,
  );
  
  $form['requestinfo']['vprice'] = array(
    '#type' => 'textfield',
    '#title' => t('Vacation Price'),
    '#default_value' => $form_state['values']['vprice'], // changed
    '#description' => "Please enter Price.",
    '#size' => 20,
    '#maxlength' => 20,
  );
  
  $form['clear'] = array(
    '#type' => 'submit',
    '#value' => 'Reset form',
    '#validate' => array('my_module_my_form_clear'),
  );
   $form['showp'] = array(
    '#type' => 'submit',
    '#value' => 'view',
  );
 
  $form['next'] = array(
    '#type' => 'submit',
    '#value' => 'Next >>',
  );
  return $form;
}

function show_pending_request()
{
$sql = db_query("SELECT v_date FROM {requests}");

while ($obj = db_fetch_object($sql))
     {
        $form['requests']['test'] = array(
            '#type' => 'textfield',
            '#title' => t('Pending Requests'),
            '#default_value' => $obj->v_date,
            '#size' => 20,
            '#maxlength' => 255
        );
		 
     }

 return $form;
}



function request_my_form_new_name($form, &$form_state) 
{
  $form_state['storage']['new_name'] = TRUE;
  $form_state['rebuild'] = TRUE; // Will cause the default submit function
                                 // to be skipped.
}

function request_my_form_clear($form, &$form_state) {
  unset ($form_state['values']);  // ensures fields are blank after reset
                                  // button is clicked
  unset ($form_state['storage']); // ensures the reset button removes the
                                  // new_name part

  $form_state['rebuild'] = TRUE;
}

function request_my_form_submit($form, &$form_state) 
{
  // Handle page 1 submissions
  if ($form_state['clicked_button']['#id'] == 'edit-next') 
  {
  $form_state['storage']['page_one_values'] = $form_state['values'];
    db_query("INSERT INTO {requests} (name, v_date, v_price) VALUES ('%s','%s','%s' )", 
	$form_state['storage']['page_one_values']['first'],
	$form_state['storage']['page_one_values']['vdate'],
	$form_state['storage']['page_one_values']['vprice']); //page 1
	drupal_set_message(t('Your form has been saved.'));
	}
	
	else if ($form_state['clicked_button']['#value'] == 'view') 
	{
	
		drupal_redirect_form('http://localhost/drupal/?q=request/pending');

    }
	
	
}




?>

how can i combine this 2 files into one...
thanks for help