MarkItUP! Tool

Ariyasa · Apr 22, 2015
bli putu, mo tanya nie ttg tool MarkItUP kyk tool pada input post ini.
yang saya mo tanya: kira2 apa yg jadi masalah ya inputan dari markitup kadang mau masuk kadang tidak mau?
misalnya pas banyak baris dan format kyk buat postingan/artikel gitu gk mau masuk ke database. bhkn kadang2 yang pendek banged, misalkan 1 kalimat saja pada bagian isi artikel dari MarkItUp itu gk bisa masuk, gagal masuk ke database.
apakah ada hubungan dengan tipe data(saya make Text utk tipe data isi artikel)? ataukah karena brower(settingannya/addons-nya)? atau markitup saya yg jelek?:(

mohon bantuannya bli putu.
suksma.

Lihat semua 1 jawaban

Silahkan login untuk menjawab!

paginasi

rianty · Apr 15, 2015
salam kenal, sy bru gabung mw tanya ms.. sy lg bikin try out online dengan paginasi setiap soal 1 halaman, nah untuk save jawaban ketika netx page gmn ya dan waktuny juga gx berubah dr awal lg
<?php
include "config.php";
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
session_start();
if (empty($_SESSION['username'])AND empty($_SESSION['password'])) {
echo "<center> Untuk mengakses modul, anda harus login<br>";
echo "<a href=../tes.php><b>Login</b></a></center>";
}

if (isset($_COOKIE['pilihan']))

echo "Halo " . $_COOKIE['user'] . "!<br>";



{
$waktu = date('H:i:s');
$date = date('d-m-Y ');
$hour = date('H')+6;
$second = date(':i:s');
$today = "$date "."$hour".$second;
echo"
<head>
     <link href=../css/style.css rel=stylesheet type=text/css />
	   <title>Aplikasi Tryout Ujian Nasional</title>	
</head>
 
<body>
 <body onunload=keluar()>
<div id=wrapper>

<div id=header>
<table width=100% cellpadding=0 cellspacing=0 border=0>
  <tr bgcolor=#000066 style=color:#66FFFF class=texin>
    <td width=40% height=28><img src=../img/icon.png align=absmiddle/></a><span class=texin></span></td>
	<td align=right > <font size=2>(<span id=user_name >$_SESSION[nama]</span>)
    	<a href=../tes.php style=color:#FFFF00>LogOut</a> </font>   </td>
<td align=right>    </td>
  </tr>
  <tr>
    <td colspan=2 bgc	<style>
</table>
</div>


<table width=100% cellpadding=0 cellspacing=0 border=0 >
  <tr><td>
    <input type=hidden id=txt_kd_mapel value=SMAIASBID />
     	<input type=hidden id=txt_p_id value= />
        <input type=hidden id=txt_mulai value=$today  />
        <input type=hidden id=div_estimasi_waktu value=120 /></td>
  </tr>
  <tr>
    <td>
	  <div id=div_main_test>
		
";
}
?>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
 
   $(document).ready(function() {
      /** Membuat Waktu Mulai Hitung Mundur Dengan 
       * var detik = 0,
       * var menit = 1,
       * var jam = 1
       */
       var detik = 0;
       var menit = 0;
       var jam = 2;
 
      /**
       * Membuat function hitung() sebagai Penghitungan Waktu
       */
       function hitung() {
          /** setTimout(hitung, 1000) digunakan untuk 
	   *  mengulang atau merefresh halaman selama 1000 (1 detik) */
	   setTimeout(hitung,1000);
 
	  /** Menampilkan Waktu Timer pada Tag #Timer di HTML yang tersedia */
	   $('#timer').html( 'Sisa Waktu : ' + jam + '  : ' + menit + ' : ' + detik + ' ');
 
	  /** Melakukan Hitung Mundur dengan Mengurangi variabel detik - 1 */
	   detik --;
 
	  /** Jika var detik < 0
	   *  var detik akan dikembalikan ke 59
	   *  Menit akan Berkurang 1
	   */
	   if(detik < 0) {
	      detik = 59;
	      menit --;
 
	      /** Jika menit < 0
	       *  Maka menit akan dikembali ke 59
	       *  Jam akan Berkurang 1
	       */
	       if(menit < 0) {
 		  menit = 59;
		  jam --;
 
		  /** Jika var jam < 0
		   *  clearInterval() Memberhentikan Interval 
		   *  Dan Halaman akan membuka http://tahukahkau.com/
		   */
		   if(jam < 0) { 
                      clearInterval();
 		      window.location = "http://tahukahkau.com";
                   }
	       }
	   } 		
        }
 	/** Menjalankan Function Hitung Waktu Mundur */
        hitung();
   });
// ]]></script>

</head>


<table width="100%" cellpadding="0" cellspacing="0" border="1" bordercolor="#c3d9ff">
<tr valign="middle" bgcolor="#c3d9ff" class="texin">
	<td height="28">
    <table width="100%">
        <tr style="color:#FF0000">
            <!--<td align="right" width="25px" valign="middle"><img src="test/smp/tryout/soal.jpg" alt="Nomer :" align="absmiddle"/></td>-->
            <td align="left" valign="middle">
				
            <td width="2px" ></td>
            <td align="right" valign="middle"><font size=2 color=blue><div id='timer'>-</div></td></font>
            <td align="left" width="25px" valign="middle"><img src="../img/jam.jpg" align="absmiddle"/></td>
        </tr>
    </table>
	</td>
</tr>
<tr>
	<td>
	

	<?php
	
// Memulai session  
session_start();  

// menyimpan informasi pada session  

?>  
<?php
	  	 // JUMLAH DATA YANG DITAMPILKAN PER HALAMAN
      $dataPerPage = 1;
 
      // Apabila $_GET['page'] sudah didefinisikan, gunakan nomor halaman tersebut,
      // Sedangkan apabila belum, nomor halamannya 1.
      if(isset($_GET['page']))
      {
        $noPage = $_GET['page'];
      }
      else $noPage = 1;
 
      // Perhitungan offset
      $offset = ($noPage - 1) * $dataPerPage;
 
    
 
      // MENGAMBIL DATA    
      $query = "SELECT * FROM soal where matpel='IND' ORDER BY id_soal ASC LIMIT $offset, $dataPerPage";
      $hasil=mysql_query("select * from soal where matpel='IND' ");
	  $jumlah=mysql_num_rows($hasil);
      $result = mysql_query($query) or die('Error');
     
      // Penomoran Item
      $nomor=1;
      $nomor1 = 1 * $noPage;
	 
 
      while($data = mysql_fetch_array($result))
        {
            $id=$data["id_soal"];
			$pilihan_a=$data["option_a"];
			$pilihan_b=$data["option_b"];
			$pilihan_c=$data["option_c"];
			$pilihan_d=$data["option_d"]; 
          //if ($noPage <= 1)
            //{
              //echo $nomor++."<br>";
            //}
          //else
            //{    
              //echo $nomor1++."<br>";
            //}
            
        			?> 
		
		<div id="div_run">
		<form name="form1" method="post" action="aksi.php">
			<input type="hidden" name="id[]" value=<?php echo $id; ?>>
			<input type="hidden" name="jumlah" value=<?php echo $jumlah; ?>>
			<table width="100%">
			<tr>
				<td align="left" style="padding:8px"><div id="div_soal">
				
					<strong><?php echo $nomor1++; ?>. <?php echo $data['soal']; ?></strong>  
			</tr>
			<tr>
				<td align="left">
					<table width="100%" cellpadding="0" cellspacing="0" border="0" align="left">
					<tr><td colspan="2" height="20px"></td></tr>
					  <tr valign="top">
						<td width="40px"><input name="pilihan[<?php echo $id; ?>]" type="radio" value="A">A.</label></td>
						<td><?php echo "$pilihan_a"; ?></label></td>
					  </tr>
					<tr><td colspan="2" height="20px" valign="middle"><hr size="1" style="color:#c3d9ff"/></td></tr>
					  <tr valign="top">
						<td><input name="pilihan[<?php echo $id; ?>]" type="radio" value="B">B.</label></td>
						<td><?php echo "$pilihan_b"; ?></div></label></td>
					  </tr>
					<tr><td colspan="2" height="20px" valign="middle"><hr size="1" style="color:#c3d9ff"/></td></tr>
					  <tr valign="top">
						<td><input name="pilihan[<?php echo $id; ?>]" type="radio" value="C">C.</label></td>
						<td><?php echo "$pilihan_c"; ?></div></label></td>
					  </tr>
					<tr><td colspan="2" height="20px" valign="middle"><hr size="1" style="color:#c3d9ff"/></td></tr>
					  <tr valign="top">
						<td><input name="pilihan[<?php echo $id; ?>]" type="radio" value="D">D.</label></td>
						<td><?php echo "$pilihan_d"; ?></div></label></td>
					  </tr>
				
					<tr><td colspan="2" height="20px"></td></tr>
					</table>
				</td>
			</tr>
			</table>
		</div>
	</td>
</tr>
<tr>
<?php
}
?>
<?php

// Mencari jumlah semua data tabel 'alamat', kemudian simpan dalam variabel $jumData
        $query3   = "SELECT COUNT(*) AS jumData FROM soal";
        $hasil3  = mysql_query($query3);
        $data3    = mysql_fetch_array($hasil3);
 
        $jumData = $data3['jumData'];
        echo "<br><center>";
          if ($jumData > 1)
            {
 
              // Menentukan jumlah halaman yang muncul berdasarkan jumlah semua data
              $jumPage = ceil($jumData/$dataPerPage);
 
              // Menampilkan link 'Sebelum'  
              if ($noPage > 1)
 
              $query = "SELECT * FROM soal";
              $result = mysql_query($query) or die('Error');
 
              $data = mysql_fetch_array($result);
			  

            
			?>
    
	<td height="40px" align="center" valign="middle" bgcolor="#c3d9ff" >
	<?php
	 if ($noPage > 1)
	 echo  "<a href='".$_SERVER['PHP_SELF']."?page=".($noPage-1)."'><< Back</a>";
	?>
		
		<button value="selesai" id="submit" name="submit" style="height:50px; width:60px;background: url('../img/save.png') no-repeat center center ;" ></button>   
        
    <?php
	 if ($noPage < $jumPage)
     echo "<a href='".$_SERVER['PHP_SELF']."?page=".($noPage+1)."'>Next >></a>";
     ?>
						
	</td>
</tr>
</table>
</form> 
<div id="footer"></b>
</div>
</body>
</html>

<?php
}
?>
Silahkan login untuk menjawab!
data sudah dapat dimasukkan dari database dan tampil di sistem, namun ketika diedit dari sistem terdapat error,,

<?PHP

class SettingController extends BaseController
{
public function index()
{
//
$setting = setting::all();
$users = users::all();
$value = Session::get('login');
//print_r($value);
//exit;
if (!Session::has('login'))
{
return Redirect::to('login');
}
//print_r($setting);
//exit;
// load the view and pass the nerds
$id = 0;
foreach(Session::get('login') as $key )
{
$id =$key->id;
//echo $key->email_user;
}
$datas = DB::SELECT("select * from settings where id_user='".$id."'");

$settings = DB::SELECT("select * from settings where id_user='".$id."' order by nama_table asc");


return View::make('setting.index')
->with('users', $users)
->with('setting', $datas)
->with('settings', $settings);
}

/**
* Show the form for creating a new resource.
*
* return Response
*/

public function create()
{
//
$users = users::all();


$value = Session::get('login');
//print_r($value);
//exit;
if (!Session::has('login'))
{
return Redirect::to('login');
}
return View::make('setting/index')
->with('users', $users);
}

/**
* Store a newly created resource in storage.
*
* return Response
*/
public function store()
{
//
$rules = array(
'nama_table' => 'required',
'create' => 'required',
'update' => 'required',
'delete' => 'required',
'view' => 'required'
//'id_topic' => 'required'
);
$validator = Validator::make(Input::all(), $rules);

// process the login
if ($validator->fails()) {
return Redirect::to('setting/index')
->withErrors($validator)
->withInput(Input::except('password'));
} else {
// store
$settings = new settings;
$settings->nama_table = Input::get('nama_table');
$settings->create = Input::get('create');
if (is_array('create')) {
for ($i = 0; $i < count($create); $i++) {
$settings = DB::table('settings')->insertGetId(array('create'=>Input::get('create'),'settings',$create[$i]));

}
}
$settings->update = Input::get('update');
if (is_array('update')){
for ($i = 0; $i < count($update); $i++) {
$settings = DB::table('settings')->insertGetId(array('edit'=>Input::get('update'),'settings',$update[$i]));

}
}
$settings->delete = Input::get('delete');
if (is_array('delete')) {
for ($i = 0; $i < count($delete); $i++) {
$settings = DB::table('settings')->insertGetId(array('delete'=>Input::get('delete'),'settings',$delete[$i]));

}
}
$settings->view = Input::get('view');
if (is_array('view')) {
for ($i = 0; $i < count($view); $i++) {
$settings = DB::table('settings')->insertGetId(array('view'=>Input::get('view'),'settings',$view[$i]));

}
}
//$setting->id_user = Input::get('id_user');
//$setting->id_topic = Input::get('id_topic');

$settings->save();
// redirect
Session::flash('message', 'Successfully created setting!');
return Redirect::to('setting');
}

}

/**
* Display the specified resource.
*
* param int $id
* return Response
*/
public function show($id)
{
//
$setting = setting::find($id);

// show the view and pass the nerd to it
return View::make('setting.show')
->with('setting', $setting);
}

/**
* Show the form for editing the specified resource.
*
* param int $id
* return Response
*/
public function edit($id)
{
//
$setting = setting::find($id);

$users = users::all();

$value = Session::get('login');
//print_r($value);
//exit;
if (!Session::has('login'))
{
return Redirect::to('login');
}
$settings = DB::SELECT("select * from settings where id_user='".$id."' order by nama_table asc");

return View::make('setting.edit')
->with('users', $users)
->with('setting', $setting)
->with('settings', $settings);

}

/**
* Update the specified resource in storage.
*
* param int $id_setting
* return Response
*/
public function update($id)
{
//
$rules = array(
'nama_table' => 'required',
'create' => 'required',
'update' => 'required',
'delete' => 'required',
'view' => 'required'
);
$validator = Validator::make(Input::all(), $rules);

// process the login
if ($validator->fails()) {
return Redirect::to('setting/' . $id . '/edit')
->withErrors($validator)
->withInput(Input::except('password'));
} else {
// store
$setting = setting::find($id);
$setting = new settings;
$setting->nama_table = Input::get('nama_table');
$setting->create = Input::get('create');
if (is_array('create')) {
for ($i = 0; $i < count($create); $i++) {
$setting = DB::table('settings')->insertGetId(array('create'=>Input::get('create'),'settings',$create[$i]));

}
}
$setting->update = Input::get('update');
if (is_array('update')){
for ($i = 0; $i < count($update); $i++) {
$setting = DB::table('settings')->insertGetId(array('edit'=>Input::get('update'),'settings',$update[$i]));

}
}
$setting->delete = Input::get('delete');
if (is_array('delete')) {
for ($i = 0; $i < count($delete); $i++) {
$setting = DB::table('settings')->insertGetId(array('delete'=>Input::get('delete'),'settings',$delete[$i]));

}
}
$setting->view = Input::get('view');
if (is_array('view')) {
for ($i = 0; $i < count($view); $i++) {
$setting = DB::table('settings')->insertGetId(array('view'=>Input::get('view'),'settings',$view[$i]));

}
}
//$setting->id_user = Input::get('id_user');
//$setting->id_topic = Input::get('id_topic');

$setting->save();
// redirect
Session::flash('message', 'Successfully updated setting!');
return Redirect::to('setting');
}
}

/**
* Remove the specified resource from storage.
*
* param int $id
* return Response
*/
public function destroy($id)
{
//
$setting = setting::find($id);
$setting->delete();

// redirect
Session::flash('message', 'Successfully deleted the setting!');
return Redirect::to('setting');
}

}

index.blade.php

<!DOCTYPE html>


<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8"/>
<title> </title>
<!-- BEGIN GLOBAL MANDATORY STYLES -->

@include('headerjs')
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
@include('header')
<div class="clearfix">
</div>
<!-- BEGIN CONTAINER -->
<div class="page-container">
<!-- BEGIN SIDEBAR -->
<div class="page-sidebar-wrapper">
<div class="page-sidebar navbar-collapse collapse">
<!-- add "navbar-no-scroll" class to disable the scrolling of the sidebar menu -->
@include('menu')
</div>
</div>
<!-- END SIDEBAR -->
<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
<div class="page-content">


<div class="row">
<div class="col-md-12">
<!-- BEGIN PAGE TITLE & BREADCRUMB-->
<h3 class="page-title">
User Management
</h3>
<ul class="page-breadcrumb breadcrumb">
<li>
<i class="fa fa-home"></i>
<a href="index.html">
User
</a>
<i class="fa fa-angle-right"></i>
</li>
<li>
<a href="#">
User Management
</a>
</li>
<li class="pull-right">
<div id="dashboard-report-range" class="dashboard-date-range tooltips" data-placement="top" data-original-title="Change dashboard date range">
<i class="fa fa-calendar"></i>
<span>
</span>
<i class="fa fa-angle-down"></i>
</div>
</li>
</ul>
<!-- END PAGE TITLE & BREADCRUMB-->
</div>
</div>
<!-- END PAGE HEADER-->

<div class="clearfix">
</div>
<div class="row">

<!-- BEGIN PORTLET-->


<!-- will be used to show any messages -->
@if (Session::has('message'))
<div class="alert alert-info">{{ Session::get('message') }}</div>
@endif
{{ HTML::ul($errors->all()) }}
{{ Form::open(array('url' => 'setting')) }}

<div class="col-md-3">
<label for="id_user">User</label>
<select id="id_user" name="id_user" class="form-control">
@foreach($users as $key => $value)
<option value="{{ $value->id }}">{{ $value->nama_user }}</option>
@endforeach
</select>
</div>
<br /><br /><br /> <br /><br /><br />
<table class="table table-striped table-bordered">
<thead>
<tr>
<td>No</td>
<td>Nama Tabel</td>
<td>Create</td>
<td>Update</td>
<td>Delete</td>
<td>View</td>
</tr>
</thead>

<thead>
<?php $no = 1; ?>
@foreach($settings as $key => $value)
<tr>
<td>{{$no}}</td>
<td>{{$value->nama_table}}</td>
<td>
<input name="create" type="checkbox" value="" id=""
@if($value->create==1)
checked="checked"
@endif

>

</td>
<td>
<input name="update" type="checkbox" value="" id=""
@if($value->update==1)
checked="checked"
@endif
>

</td>
<td>
<input name="delete" type="checkbox" value="" id=""
@if($value->delete==1)
checked="checked"
@endif
>

</td>
<td>
<input name="view" type="checkbox" value="" id=""
@if($value->view==1)
checked="checked"
@endif
>

</td>
</tr>
<?php $no++; ?>
@endforeach
</table>
{{ Form::submit('Save', array('class' => 'btn btn-primary')) }}



<!-- END START TASK LIST -->


</div>
</div>
</div>
<!-- END CONTAINER -->
@include('footer')
Silahkan login untuk menjawab!
Tolong gan apa ada yang salah ? kenapa pas diklik combobox kecamatan, kelurahannya ga muncul ? scriptnya masih salahkah ? terima kasih gan.

<?php
include "../koneksi.php";

?>


<html>

<title>Input Hak Akses Lampid</title>
<link rel="stylesheet" href="../boostrap/css/bootstrap.min.css">

<script src="../js/jquery-2.1.3.min.js" type="text/javascript"></script>
</head>

<body>


<form name="form1" method="post" action="pet_simpan.php">
<div align="center">Data Hak Akses Lampid </div>
  <table width="495" border="0" align="center">

    <tr>
      <td width="131"><div align="left">Nama Petugas </div></td>
      <td width="12">:</td>
      <td width="338"><label>
        <input name="nama_petugas" type="text" id="nama_petugas" maxlength="30" size="30"/>
      </label></td>
    </tr>
    <tr>
      <td>NIP</td>
      <td>:</td>
      <td><label>
        <input name="nip" type="text" id="nip" maxlength="18" size="30"/>
      </label></td>
    </tr>
    <tr>
      <td>Status</td>
      <td>:</td>
      <td><label>
        <select name="status" >
          <option selected>--- Pilih Status ---</option>
		  <option value="1"> Adb Dinas </option>
		  <option value="2">Kepala Kasi E-Monev</option>
          <option value="3">Registrasi Kecamatan</option>
          <option value="4">Registrasi Kelurahan</option>
        </select>
      </label></td>
    </tr>
    <tr>
      <td>Kecamatan</td>
      <td>:</td>
      <td><label>
      <select name="id_kec" id="id_kec">
        <option>--- Pilih Kecamatan ---</option>
		<?php
		  include ('../koneksi.php');
		  $sql=mysql_query ("select * from kecamatan order by id_kec asc");
		  		  while ($row=mysql_fetch_assoc($sql)){
		  echo"<option value='$row[id_kec]'> $row[nama_kec]</option>";
		  
		  }
		  ?>
      </select>
      </label></td>
    </tr>
	
    <tr>
      <td>Kelurahan</td>
      <td>:</td>
      <td><label>
      <select id="id_kel"  name="id_kel">
	  <option> -Pilih Kelurahan-</option>
        <script type="text/javascript">
	  $(document).ready(function() {
		  $("#id_kec").change(function(){
			  var nama_kec=$("#id_kec").val();
			  $.ajax({
				  url:"cek_kel.php",
				  data:"id_kec="+id_kec,
				  success: function(data){
					  $("#id_kel").html(data);
				  }
			  });
		  });
    });
	</script>
    </select>
   
	  
      </label></td>
    </tr>
    <tr>
      <td>Username</td>
      <td>:</td>
      <td><label>
        <input name="username" type="text" id="username" maxlength="20" size="30">
      </label></td>
    </tr>
    <tr>
      <td>Password</td>
      <td>&nbsp;</td>
      <td><input type="password" name="password"  size="30"></td>
    </tr>
    <tr>
      <td colspan="3"><label>
        <div align="center">
          <input type="submit" name="Submit" value="Simpan">
          <input type="reset" name="Submit2" value="Batal">
          </div>
      </label></td>
    </tr>
  </table>
</form>
<script type="text/javascript" src="../boostrap/js/bootstrap.min.js"></script>


</html>

<?php
		  include ("../koneksi.php");
		  $id_kel=$_GET['id_kel'];
		  $sqllagi=mysql_query("SELECT * FROM kelurahan id_kel='$id_kel'");
		  echo "<option> - Pilih Kelurahan - </option>";
		  while ($row=mysql_fetch_assoc($sqllagi)){
		   echo"<option value='$row[id_kel]'> $row[nama_kel]</option>";
		  }
		  
		  ?>
      

Lihat semua 1 jawaban

Silahkan login untuk menjawab!
saya ingin bertanyaa pak, kaan saya mau coba maen Page Dinamis menggunakan kode dibaawhi ni :
<?php
    $p=isset($_GET['page'])?$_GET['page']:null;
    switch($p){
        default:
			include "market.php";
            break;
        case "gems_coc":
            include "konten/gems_coc/index.php";
            break;                       
        case "diamon_lgr":
            include "konten/diamon_lgr/index.php";
            break;  
		case "diamon_hayday":
            include "konten/diamon_hayday/index.php";
            break;  
    }
    ?>

nah contoh yang bagian ini :
include "konten/gems_coc/index.php";
dia cuman mengambil index.php nya doank ,.sementara di index itu ada file gambaar dan dia tidak terbaca karenaa directori nya sudah beda ..


kira kira gimna caranya biar kita bisa dapat index.php bersama gambar di folder itu sendiri .. maksudnya gambar itu berasal dari folder index.php.

Lihat semua 4 jawaban

Silahkan login untuk menjawab!
Permisi ane member baru pemula banget nih mohon pencerahan agan-agan kiranya bisa bantu saya dalam pencerahan pembuatan form dengan beberapa row :
asusmsi saya buat 5 row penilaian :nilai1 x nilai2= hasil ( nilai hasil otomatis )

row1 : nilai1 X nilai2 = hasil2
row2 : nilai3 x nilai4 = hasil3
row3 : nilai5 x nilai6 = hasil4
total = hasil2 + hasil3 +hasil4
Silahkan login untuk menjawab!