Joomla Indonesia

Login or Sign Up
Sign In or Register
Avatar
Not Registered Yet?

Join Now! It's FREE. Get full access and benefit from this site

Reset My password - Remind Me My username

Username
Password
Remember me
  • Page:
  • 1

TOPIC: [solved] bagaimana caranya mengkonfigurasikan mosMenuBar ?

[solved] bagaimana caranya mengkonfigurasikan mosMenuBar ? 13 years 8 months ago #2236

  • arieonline
  • arieonline's Avatar
  • OFFLINE
  • Administrator
  • Posts: 2988
  • Karma: 98
File admin.mathipb.php
<?php
// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );

// ensure user has access to this function
if (!($acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'all' )
		| $acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'com_contact' ))) {
	mosRedirect( 'index2.php', _NOT_AUTH );
}

require_once( $mainframe->getPath( 'admin_html' ) );

$act = mosGetParam( $_REQUEST ,'act') ;
$task = mosGetParam( $_REQUEST ,'task') ;

switch ($act) {
	case 'daftarDosen':
		switch ($task) {
			case 'editA':
				editDosen();
				break;

			case 'cancel':
				listDosen();
				break;

			default:
				listDosen();
				break;
		}
		break;

	default:
		cpanel();
		break;
}

function listDosen() {

	HTML_mathipb::listDosen();
}

function editDosen() {

	HTML_mathipb::editDosen();
}

function cpanel() {

	HTML_mathipb::cpanel();
}


?>

File admin.mathipb.html.php
<?php

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );

class HTML_mathipb {

	function listDosen() {
		mosCommonHTML::loadOverlib();
		?>
		<form action="index2.php" method="post" name="adminForm">
		This is a list of name
		<a href="index2.php?option=com_mathipb&act=daftarDosen&task=editA&hidemainmenu=1>
		go to edit area
		</a>
		<input type="hidden" name="act" value="daftarDosen" />
		<input type="hidden" name="task" value="" />
		</form>
		<?php
	}

	function cpanel() {
		mosCommonHTML::loadOverlib();
		?>
		This is Control Panel
		<a href="index2.php?option=com_mathipb&act=daftarDosen">
		go to list data
		</a>
		<form action="index2.php" method="post" name="adminForm">
		<input type="hidden" name="act" value="daftarDosen" />
		<input type="hidden" name="task" value="" />
		</form>
		<?php
	}


	function editDosen() {
		mosCommonHTML::loadOverlib();
		?>
		<form action="index2.php" method="post" name="adminForm">
		<input type="hidden" name="act" value="daftarDosen" />
		<input type="hidden" name="task" value="" />
		</form>
		<?php
	}
}
?>

File toolbar.mathipb.php
<?php

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );

require_once( $mainframe->getPath( 'toolbar_html' ) );

switch ($act) {
	case 'daftarDosen':
		switch ($task) {
			case 'new':
				TOOLBAR_mathipb::_EDIT();
				break;

			case 'editA':
				TOOLBAR_mathipb::_EDIT();
				break;

			default:
				TOOLBAR_mathipb::_DEFAULT();
				break;
		}
		break;

	default:
		break;
}
?>

File toolbar.mathipb.html.php
<?php

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );

class TOOLBAR_mathipb {

	function _EDIT() {
		mosMenuBar::«»startTable();
		mosMenuBar::cancel();
		mosMenuBar::«»spacer();
		mosMenuBar::back();
		mosMenuBar::«»spacer();
		mosMenuBar::«»save();
		mosMenuBar::«»spacer();
		mosMenuBar::endTable();
	}

	function _DEFAULT() {
		mosMenuBar::«»startTable();
		mosMenuBar::deleteList();
		mosMenuBar::«»spacer();
		mosMenuBar::editListX();
		mosMenuBar::«»spacer();
		mosMenuBar::addNewX();
		mosMenuBar::«»spacer();
		mosMenuBar::endTable();
	}
}
?>

jika saya klik mosMenuBar::cancel(); pada TOOLBAR_mathipb::_EDIT() akan terforward ke "Administration Home"

bagaimana caranya agar/supaya jika kita klik mosMenuBar::cancel(); bisa di forward ke index2.php?option=com_mathipb&act=daftarDosen / function listDosen() / theOtherFunction()

klo pake mosMenuBar::back(); sih bisa balik ke listDosen(); secara itu cuma fungsi backnya javascript

ayo bantuin jawab yah...<br><br>Pesan diedit oleh: arieonline, pada: 2007/07/25 10:47
The topic has been locked.

Re:bagaimana caranya mengkonfigurasikan mosMenuBar ? 13 years 8 months ago #2261

  • alvino
  • alvino's Avatar
  • OFFLINE
  • Id-Joomla Team
  • Posts: 1123
  • Karma: 45
Sepertinya tinggal tambahkan 'mosRedirect' seperti di file 'admin.contact.php' paling bawah
function cancelContact() {
	global $database;

	$row = new mosContact( $database );
	$row-&gt;bind( $_POST );
	$row-&gt;checkin();
	mosRedirect('index2.php?option=com_contact');
}
mmmmm
The topic has been locked.

Re:bagaimana caranya mengkonfigurasikan mosMenuBar ? 13 years 8 months ago #2284

  • arieonline
  • arieonline's Avatar
  • OFFLINE
  • Administrator
  • Posts: 2988
  • Karma: 98
tinggal nambah kode ini di form edit dosen
&lt;input type=&quot;hidden&quot; name=&quot;option&quot; value=&quot;&lt;?php echo $option; ?&gt;&quot; /&gt;
The topic has been locked.
  • Page:
  • 1
Moderators: alvino, ronysyz, rajasetan, KhanTry
Time to create page: 0.064 seconds

Diskusi Terakhir

  • No posts to display.

Joomla User Group Indonesia

Joomla User Group indonesia

Id-joomla.com adalah situs resmi Joomla User Group (JUG) Indonesia dan Joomla Translation Team

 
Download Terjemahan Joomla terakreditasi dari JoomlaCode dan laporkan bugs, ide dan saran nya di Sub Forum Hanacaraka

Socials

twitter id joomlafb idjoomla