From aae16bbf797c3eec8234eae8dd6b53e5f8bb771b Mon Sep 17 00:00:00 2001 From: prashant Date: Wed, 1 Apr 2015 11:26:03 +0530 Subject: removed unwanted code --- bulk_code.module | 135 ++++--------------------------------------------------- 1 file changed, 9 insertions(+), 126 deletions(-) diff --git a/bulk_code.module b/bulk_code.module index f3fa31b..ac79c18 100755 --- a/bulk_code.module +++ b/bulk_code.module @@ -6,7 +6,7 @@ $items["bulk_code"] = array( "title" => "Bulk code manage", "page callback" => "bulk_code_all", - "access arguments" => array("bulk code comments"), + "access arguments" => array("bulk code approve/disapprove"), "type" => MENU_NORMAL_ITEM ); $items["bulk_code/ajax"] = array( @@ -19,21 +19,7 @@ "access callback" => TRUE, "type" => MENU_CALLBACK ); - // $items["bulk_code/books/all/ajax"] = array( - // "page callback" => "bulk_code_books_all_ajax", - // "access callback" => TRUE, - // "type" => MENU_CALLBACK - // ); - // $items["bulk_code/forms/ajax"] = array( - // "page callback" => "bulk_code_forms_ajax", - // "access callback" => TRUE, - // "type" => MENU_CALLBACK - // ); - // $items["comments/rand/ajax"] = array( - // "page callback" => "bulk_code_rand_refresh_ajax", - // "access callback" => TRUE, - // "type" => MENU_CALLBACK - // ); + return $items; } @@ -116,7 +102,7 @@ function bulk_code_all(){ if($action == 1) { $data .= ""; - /* approving entire book */ + /* approving entire book */ $chapter_q = db_query("SELECT * FROM {textbook_companion_chapter} WHERE preference_id = %d", $pref_id); while ($chapter_data = db_fetch_object($chapter_q)) { @@ -186,122 +172,19 @@ Reason for deletion: $data .='Error sending email message.'; echo $data; exit(); - } - + } } else { $data .= "Error Dis-Approving and Deleting Entire Book."; echo $data; exit(); - } - - } -} - -// function bulk_code_books_all_ajax($id) { -// $data = ""; -// $base_url = $GLOBALS['base_url']. '/sites/all/modules/tbc_comments/image/'; -// $comment_query = db_query(" -// SELECT * FROM tbc_comments WHERE post_id = %s ORDER BY id DESC -// "); -// $data .= "

Comments.....

"; -// $data .= "
"; -// while ($comments_data = db_fetch_object($comment_query,$id)) { -// $data .= "
"; -// $data .= "
"; -// $data .= "avatar"; -// $data .= "
"; -// $data .= "
"; -// $data .= "

".$comments_data->name." said....

".$comments_data->date."
"; -// $data .= "

".$comments_data->comment."

"; -// $data .= "
"; -// } -// $data .= "
"; -// echo $data; -// exit(); - -// } - -// function bulk_code_forms_ajax($id){ -// $id = $_POST['id']; -// $data = ""; - - - -// $base_url = $GLOBALS['base_url']. '/sites/all/modules/tbc_comments/image/'; -// $comment_query = db_query(" -// SELECT * FROM tbc_comments WHERE post_id = %d ORDER BY id DESC LIMIT 15 -// ", $id); - -// $data .= "
"; -// $data .= "

Comments.....

"; -// $data .= "
"; -// while ($comments_data = db_fetch_object($comment_query)) { -// $data .= "
"; -// $data .= "
"; -// $data .= "avatar"; -// $data .= "
"; -// $data .= "
"; -// $data .= "

".$comments_data->name." said....

".$comments_data->date."
"; -// $data .= "

".$comments_data->comment."

"; -// $data .= "
"; -// } -// $data .= "
"; -// $data .= "
"; -// $data .= ""; -// $data .= ""; -// $data .= " "; -// $data .= "
"; -// $data .= "
"; -// $num1 =rand (1,5); -// $num2 =rand (1,5); -// $num3 = $num1 + $num2; -// $data .= ""; -// $data .= "
"; -// $data .= ""; - -// echo $data; - - -// exit(); -// } - -// function bulk_code_rand_refresh_ajax(){ -// $data = ""; -// $num1 =rand (1,5); -// $num2 =rand (1,5); -// $num3 = $num1 + $num2; -// $data .= "
"; -// $data .= ""; -// $data .= "
"; -// echo $data; -// exit(); - -// } + } + } + } - function bulk_code_init() { - //drupal_add_css(drupal_get_path("module", "tbc_comments") . "/css/tbc_comments_styles.css"); - //drupal_add_css(drupal_get_path("module", "tbc_comments") . "/css/tbc_comments.css"); + function bulk_code_init() { drupal_add_js(drupal_get_path("module", "bulk_code") . "/js/bulk_code_ajax.js"); drupal_add_js(drupal_get_path("module", "bulk_code") . "/js/jquery-1.4.1.min.js"); - drupal_add_js(drupal_get_path("module", "bulk_code") . "/js/jquery-1.2.6.min.js"); - - + drupal_add_js(drupal_get_path("module", "bulk_code") . "/js/jquery-1.2.6.min.js"); } -- cgit