$rt = str_replace('¬', '¬' . "\n", $id); } if ($va == 'addlines') { $rt = add_lines($id); } if ($va == 'addanchors') { $rt = add_anchors($id); } if ($va == 'deltables') { $rt = del_tables($id); } if ($va == 'delqmark') { $rt = del_qmark($id); } if ($va == 'imglabel') { $rt = add_comments($id); } if ($va == 'oldconn') { req(pop); $rt = retape('<br>' . $id, ''); } if ($va == 'replace') { list($rep, $by) = ajxr($res); $rt = str_replace($rep, $by, $id); } //if($va=='table'){$rt=ajxg($res);} if ($va == 'randim') { $_POST['randim'] = 1; $_GET['continue'] = 1; $read = $_SESSION['read']; $id = mysql_real_escape_string(stripslashes($id));
case 3: $date = add_months($date_, $i * 1); break; case 4: $date = add_months($date_, $i * 3); break; } $am0 = $am; } if (isset($_POST['go'])) { $id = get_next_trans_no(ST_JOURNAL); $ref = $Refs->get_next(ST_JOURNAL); add_gl_trans(ST_JOURNAL, $id, $date, get_post('acc_act'), 0, 0, $ref, $am0 * -1); add_gl_trans(ST_JOURNAL, $id, $date, get_post('res_act'), get_post('dimension_id'), get_post('dimension2_id'), $ref, $am0); add_audit_trail(ST_JOURNAL, $id, $date); add_comments(ST_JOURNAL, $id, $date, $memo); $Refs->save(ST_JOURNAL, $id, $ref); } else { alt_table_row_color($k); label_cell($date); label_cell($_POST['acc_act'] . " " . get_gl_account_name($_POST['acc_act'])); if ($dim > 0) { label_cell(""); } if ($dim > 1) { label_cell(""); } display_debit_or_credit_cells($am0 * -1); label_cell($memo); alt_table_row_color($k); label_cell($date);
function get_category_content(&$xmlElement, &$resources, $id, $name, $exportpath, $export_dir, $identifier, &$ridentifier, $viewid) { global $USER, $CFG, $COURSE; $bookmarks = get_category_items($id, $viewid, 'link'); $hasItems = false; if ($bookmarks) { $hasItems = true; foreach ($bookmarks as $bookmark) { unset($filecontent); unset($filename); $filecontent = ''; $filecontent .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n"; $filecontent .= '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n"; $filecontent .= '<head>' . "\n"; $filecontent .= ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' . "\n"; $filecontent .= ' <title>' . spch(format_string($bookmark->name)) . '</title>' . "\n"; $filecontent .= '<!-- ' . get_string("exportcomment", "block_exabis_eportfolio") . ' -->'; $filecontent .= '</head>' . "\n"; $filecontent .= '<body>' . "\n"; $filecontent .= ' <h1 id="header">' . spch(format_string($bookmark->name)) . '</h1>' . "\n"; $filecontent .= ' <div id="url"><a href="' . spch($bookmark->url) . '"><!--###BOOKMARK_EXT_URL###-->' . spch($bookmark->url) . '<!--###BOOKMARK_EXT_URL###--></a></div>' . "\n"; $filecontent .= ' <div id="description"><!--###BOOKMARK_EXT_DESC###-->' . spch_text($bookmark->intro) . '<!--###BOOKMARK_EXT_DESC###--></div>' . "\n"; $filecontent .= add_comments('block_exabeporitemcomm', $bookmark->id); $filecontent .= '</body>' . "\n"; $filecontent .= '</html>' . "\n"; $filename = clean_param($bookmark->name, PARAM_ALPHANUM); $ext = ".html"; $i = 0; if ($filename == "") { $filepath = $export_dir . $filename . $i . $ext; } else { $filepath = $export_dir . $filename . $ext; } if (is_file($exportpath . $filepath) || is_dir($exportpath . $filepath) || is_link($exportpath . $filepath)) { do { $i++; $filepath = $export_dir . $filename . $i . $ext; } while (is_file($exportpath . $filepath) || is_dir($exportpath . $filepath) || is_link($exportpath . $filepath)); } file_put_contents($exportpath . $filepath, $filecontent); create_ressource($resources, 'RES-' . $ridentifier, $filepath); create_item($xmlElement, 'ITEM-' . $identifier, $bookmark->name, 'RES-' . $ridentifier); $identifier++; $ridentifier++; } } $files = get_category_items($id, $viewid, 'file'); if ($files) { $hasItems = true; foreach ($files as $file) { unset($filecontent); unset($filename); $i = 0; $content_filename = $file->attachment; if (is_file($exportpath . $export_dir . $content_filename) || is_dir($exportpath . $export_dir . $content_filename) || is_link($exportpath . $export_dir . $content_filename)) { do { $i++; $content_filename = $i . $file->attachment; } while (is_file($exportpath . $export_dir . $content_filename) || is_dir($exportpath . $export_dir . $content_filename) || is_link($exportpath . $export_dir . $content_filename)); } if ($file->attachment != '') { copy($CFG->dataroot . "/" . block_exabis_eportfolio_file_area_name($file) . "/" . $file->attachment, $exportpath . $export_dir . $content_filename); } $filecontent = ''; $filecontent .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n"; $filecontent .= '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n"; $filecontent .= '<head>' . "\n"; $filecontent .= ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' . "\n"; $filecontent .= ' <title>' . spch($file->name) . '</title>' . "\n"; $filecontent .= '<!-- ' . get_string("exportcomment", "block_exabis_eportfolio") . ' -->'; $filecontent .= '</head>' . "\n"; $filecontent .= '<body>' . "\n"; $filecontent .= ' <h1 id="header">' . spch($file->name) . '</h1>' . "\n"; $filecontent .= ' <div id="url"><a href="' . spch($content_filename) . '"><!--###BOOKMARK_FILE_URL###-->' . spch($content_filename) . '<!--###BOOKMARK_FILE_URL###--></a></div>' . "\n"; $filecontent .= ' <div id="description"><!--###BOOKMARK_FILE_DESC###-->' . spch_text($file->intro) . '<!--###BOOKMARK_FILE_DESC###--></div>' . "\n"; $filecontent .= add_comments('block_exabeporitemcomm', $file->id); $filecontent .= '</body>' . "\n"; $filecontent .= '</html>' . "\n"; $filename = clean_param($file->name, PARAM_ALPHANUM); $ext = ".html"; $i = 0; if ($filename == "") { $filepath = $export_dir . $filename . $i . $ext; } else { $filepath = $export_dir . $filename . $ext; } if (is_file($exportpath . $filepath) || is_dir($exportpath . $filepath) || is_link($exportpath . $filepath)) { do { $i++; $filepath = $export_dir . $filename . $i . $ext; } while (is_file($exportpath . $filepath) || is_dir($exportpath . $filepath) || is_link($exportpath . $filepath)); } file_put_contents($exportpath . $filepath, $filecontent); create_ressource($resources, 'RES-' . $ridentifier, $filepath); create_item($xmlElement, 'ITEM-' . $identifier, $file->name, 'RES-' . $ridentifier); $identifier++; $ridentifier++; } } $notes = get_category_items($id, $viewid, 'note'); if ($notes) { $hasItems = true; foreach ($notes as $note) { unset($filecontent); unset($filename); $filecontent = ''; $filecontent .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n"; $filecontent .= '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n"; $filecontent .= '<head>' . "\n"; $filecontent .= ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' . "\n"; $filecontent .= ' <title>' . spch($note->name) . '</title>' . "\n"; $filecontent .= '<!-- ' . get_string("exportcomment", "block_exabis_eportfolio") . ' -->'; $filecontent .= '</head>' . "\n"; $filecontent .= '<body>' . "\n"; $filecontent .= ' <h1 id="header">' . spch($note->name) . '</h1>' . "\n"; $filecontent .= ' <div id="description"><!--###BOOKMARK_NOTE_DESC###-->' . spch_text($note->intro) . '<!--###BOOKMARK_NOTE_DESC###--></div>' . "\n"; $filecontent .= add_comments('block_exabeporitemcomm', $note->id); $filecontent .= '</body>' . "\n"; $filecontent .= '</html>' . "\n"; $filename = clean_param($note->name, PARAM_ALPHANUM); $ext = ".html"; $i = 0; if ($filename == "") { $filepath = $export_dir . $filename . $i . $ext; } else { $filepath = $export_dir . $filename . $ext; } if (is_file($exportpath . $filepath) || is_dir($exportpath . $filepath) || is_link($exportpath . $filepath)) { do { $i++; $filepath = $export_dir . $filename . $i . $ext; } while (is_file($exportpath . $filepath) || is_dir($exportpath . $filepath) || is_link($exportpath . $filepath)); } file_put_contents($exportpath . $filepath, $filecontent); create_ressource($resources, 'RES-' . $ridentifier, $filepath); create_item($xmlElement, 'ITEM-' . $identifier, $note->name, 'RES-' . $ridentifier); $identifier++; $ridentifier++; } } return $hasItems; }
break; case "login": $email = $_POST['email']; $pass = $_POST['password']; $user = get_user_email_pass($email, $pass); $newemail = $user['email']; $_SESSION["id"] = $newemail; break; case "comments": $fname = $_POST['fname']; $lname = $_POST['lname']; $email = $_POST['email']; $number = $_POST['number']; $subject = $_POST['subject']; $comment = $_POST['comment']; add_comments($fname, $lname, $email, $number, $subject, $comment); break; case "signup": $fName = $_POST['fName']; $lName = $_POST['lName']; $email = $_POST['email']; $number = $_POST['number']; $address = $_POST['address']; $attendee = $_POST['attendee']; $comOrg = $_POST['comOrg']; $pass = $_POST['password']; $sex = $_POST['sex']; add_user($fName, $pass, $lName, $email, $number, $address, $attendee, $comOrg, $sex); $_SESSION["id"] = $email; break; case "upload":