summaryrefslogtreecommitdiff
path: root/bulk_code.module
diff options
context:
space:
mode:
Diffstat (limited to 'bulk_code.module')
-rwxr-xr-xbulk_code.module135
1 files 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 .= "<h2>Comments.....</h2>";
-// $data .= "<div id='comment-block_".$id."' class='comment-block'>";
-// while ($comments_data = db_fetch_object($comment_query,$id)) {
-// $data .= "<div class='comment-item'>";
-// $data .= "<div class='comment-avatar'>";
-// $data .= "<img src='".$base_url."default_avatar.gif' alt='avatar'>";
-// $data .= "</div>";
-// $data .= "<div class='comment-post'>";
-// $data .= "<h3>".$comments_data->name."<span> said.... </span></h3><div style='float:right;margin-top: -27px;margin-right: -81px;'>".$comments_data->date."</div>";
-// $data .= "<p>".$comments_data->comment."</p>";
-// $data .= "</div></div>";
-// }
-// $data .= "</div>";
-// 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 .= "<div id ='close_button_".$id."' class = 'close_box'>&#x2716;</div>";
-// $data .= "<h2>Comments.....</h2>";
-// $data .= "<div id='comment-block' class='comment-block'>";
-// while ($comments_data = db_fetch_object($comment_query)) {
-// $data .= "<div class='comment-item' id = 'comment-item_".$comments_data->id."'>";
-// $data .= "<div class='comment-avatar'>";
-// $data .= "<img src='".$base_url."default_avatar.gif' alt='avatar'>";
-// $data .= "</div>";
-// $data .= "<div class='comment-post'>";
-// $data .= "<h3>".$comments_data->name."<span> said....</span></h3><div style='float:right;margin-top: -27px;margin-right: -81px;'>".$comments_data->date."</div>";
-// $data .= "<p>".$comments_data->comment."</p>";
-// $data .= "</div></div>";
-// }
-// $data .= "</div>";
-// $data .= "<form id='form_".$id."' method='post' class= 'form_comments' data-fid='".$id."'>";
-// $data .= "<input type='hidden' name='postid' value=".$id.">";
-// $data .= "<label>";
-// $data .= "<span>Name *</span>";
-// $data .= "<input type='text' name='name' id='comment-name' class= 'form_input' placeholder='Your name here.... 'required>";
-// $data .= "</label><label>";
-// $data .= "<span>Email *</span>";
-// $data .= "<input type='email' name='mail' id='comment-mail' class= 'form_input' placeholder='Your mail here....' required>";
-// $data .= " </label><label>";
-// $data .= "<input type='checkbox' name='notify' value='1'>";
-// $data .= "<span> I want to be notified. </span>";
-// $data .= " </label><label>";
-// $data .= "<span>Your comment *</span>";
-// $data .= " <textarea name='comment' id='comment' cols='30' rows='10' class= 'form_input' placeholder='Type your comment here....' required></textarea>";
-// $data .= "</label>";
-// $data .= " <input type='submit' id='submit_".$id."' value='Submit Comment' class= 'submit_form' data-sid = '".$id."' >";
-// $data .= "</form>";
-// $data .= "<div id = 'rand_fun' style='margin-top:-49px'>";
-// $num1 =rand (1,5);
-// $num2 =rand (1,5);
-// $num3 = $num1 + $num2;
-// $data .= "<label>";
-// $data .= "<font style='color:red'>".$num1. " + ". $num2. "</font>&nbsp;&nbsp;&nbsp;(Are you human, or spambot?)*";
-// $data .= "</label>";
-// $data .= "<input type='text' name='rand_num' id='rand_num' class= 'num_input' data-num= '".$num3."' placeholder='Enter the total of above numbers here.... ' required></div>";
-// $data .= "</div></div>";
-
-// echo $data;
-
-
-// exit();
-// }
-
-// function bulk_code_rand_refresh_ajax(){
-// $data = "";
-// $num1 =rand (1,5);
-// $num2 =rand (1,5);
-// $num3 = $num1 + $num2;
-// $data .= "<div id = 'rand_fun' style='margin-top:-49px'>";
-// $data .= "<label>";
-// $data .= "<font style='color:red'>".$num1. " + ". $num2. "</font>&nbsp;&nbsp;&nbsp;(Are you human, or spambot?)*";
-// $data .= "</label>";
-// $data .= "<input type='text' name='rand_num' id='rand_num' class= 'num_input' data-num= '".$num3."' placeholder='Enter the total of above numbers here.... ' required></div>";
-// 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");
}