Skip to content

Commit 9f4876c

Browse files
author
Francis Gonzales
committed
Add plugin tab
1 parent 1b6530c commit 9f4876c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

plugin/buy_courses/database.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Date: 21/05/14
66
* Time: 12:19 PM
77
*/
8+
$objPlugin = new Buy_CoursesPlugin();
89

910
$table = Database::get_main_table(TABLE_BUY_COURSE);
1011
$sql = "CREATE TABLE IF NOT EXISTS $table (
@@ -332,4 +333,11 @@
332333
payment_type VARCHAR(100) NOT NULL DEFAULT '',
333334
status VARCHAR(20) NOT NULL DEFAULT '',
334335
date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP)";
335-
Database::query($sql);
336+
Database::query($sql);
337+
338+
//Menu main tabs
339+
$rsTab = $objPlugin->addTab('Buy Courses', 'plugin/buy_courses/index.php');
340+
341+
if ($rsTab) {
342+
echo "<script>location.href = '" . $_SERVER['REQUEST_URI'] . "';</script>";
343+
}

0 commit comments

Comments
 (0)