function news_feed($user_id, $news_feed = 'no') { $user_id = mysql_real_escape_string($user_id); if ($news_feed == 'yes') { $friends_query = "SELECT * FROM friends WHERE requester_id='" . $user_id . "' AND accepted_state='1'"; $friends_result = mysql_query($friends_query); $friends_row = mysql_fetch_assoc($friends_result); $status_query = "SELECT * FROM status WHERE user_id='" . $friends_row['accepter_id'] . "' OR user_id='{$user_id}' ORDER BY status_date DESC "; } else { $friends_row = $user_id; $status_query = "SELECT * FROM status WHERE user_id='" . $friends_row['accepter_id'] . "' ORDER BY status_date DESC "; } $status_result = mysql_query($status_query); while ($status_row = mysql_fetch_assoc($status_result)) { echo id_to_name($status_row['user_id']) . ' - ' . $status_row['status_date'] . '<br />' . nl2br($status_row['status_body']) . '<br /><br />'; } }
?> '> <td style='text-align:center'><?php echo $no; ?> .</td> <td><?php echo $list->username; ?> </td> <td style='text-align:center'><?php echo id_to_name('user_level', 'id_level', $list->id_level, 'level'); ?> </td> <td style='text-align:center'><?php echo $list->kd_cabang == NULL ? '-' : id_to_name('cabang', 'kd_cabang', $list->kd_cabang, 'nm_cabang'); ?> </td> <td style='text-align:center'><a href="javascript:void();" onclick= "ajax_link('<?php echo base_url() . "pengaturan/user/edit/" . $list->id_user; ?> ')"><i class="icon-pencil"></i></a> <a href="javascript:void();" onclick= "hapus_conf('<?php echo base_url() . "pengaturan/user/hapus/"; ?> ',<?php echo $list->id_user; ?> ,<?php echo $no; ?>
function echo_journal_entry($journal_id, $header = "h2") { global $wpdb; $table = get_table('journal'); echo "<{$header}>" . sprintf(__('Journal entry %s', 'MicroBalance'), $journal_id) . "</{$header}>\n"; if (!is_numeric($journal_id) || !is_integer($journal_id + 0)) { echo "<p>" . __('Journal entry not found', 'MicroBalance') . "</p>\n"; return false; } else { $result = $wpdb->get_row("SELECT * FROM {$table} WHERE journalid = '{$journal_id}'"); if ($result == null) { echo "<p>" . __('Journal entry not found', 'MicroBalance') . "</p>\n"; return false; } else { if ($result->accountid != 0) { $account = id_to_name($result->accountid); } else { if ($result->cd == 'debit') { $account = __('Inventory', 'MicroBalance'); } else { $account = __('Till', 'MicroBalance'); } } $rows = [__('Account', 'MicroBalance') => $account . " ({$result->accountid})", __('Amount', 'MicroBalance') => "€" . $result->amount, __('Credit or debit', 'MicroBalance') => __(ucfirst($result->cd), 'MicroBalance'), __('Added on', 'MicroBalance') => $result->cdate, __('Edited on', 'MicroBalance') => $result->edate]; two_row_table($rows); return true; } } }
?> <tbody bgcolor="#eee"> <tr id='tr_<?php echo $no; ?> '> <td style='text-align:center'><?php echo $no; ?> .</td> <td><?php echo $list->username; ?> </td> <td><?php echo id_to_name('user_level', 'id_level', $list->id_level, 'level'); ?> </td> <td style='text-align:center'><a href="javascript:void();" onclick= "ajax_link('<?php echo base_url() . "pengaturan/user/edit/" . $list->id_user; ?> ')"><i class="icon-pencil"></i></a> <a href="javascript:void();" onclick= "hapus_conf('<?php echo base_url() . "pengaturan/user/hapus/"; ?> ',<?php echo $list->id_user; ?> ,<?php echo $no; ?>
?> </td> </tr> <tr> <td width='150'>Jam Terima</td> <td width='5'>:</td> <td><?php echo $info->jam_terima == '00:00:00' ? 'BELUM DITERIMA' : $info->jam_terima; ?> </td> </tr> <tr> <td width='150'>Cabang Penerima</td> <td width='5'>:</td> <td><?php echo $info->jam_terima == '00:00:00' ? 'BELUM DITERIMA' : id_to_name('cabang', 'kd_cabang', $info->kd_cabang_tujuan, 'nm_cabang'); ?> </td> </tr> </table> <h4>Item Pengiriman</h4> <table border='1'style='margin-top:10px; border-collapse:collapse;' width='100%' style="font-size:11px;"> <thead > <tr style='background:#c21712; color:#eee;'> <th>Isi Barang</th> <th>Berat (kg)</th> <th>Harga / kg</th> <th>Subtotal</th> </tr> </thead>
$proceed = false; if ($user != "" || $amount != "" || $decription != "") { if ($amount < 0) { $messages[] = "Amount should be positive!"; } elseif ($amount == "") { $messages[] = "Amount is required!"; } elseif (!is_numeric($amount)) { $messages[] = "Amount should be a number!. Use only numbers and if necessary one dot or comma."; } elseif ($amount == 0) { $messages[] = "Amount can not be zero!"; } if (count($messages) == 0) { $proceed = true; $transaction = new_inventory_purchase($user, $amount, $description, get_current_user_id()); if ($transaction > 0) { echo "<p>" . sprintf(__('Inventory purchase of %s by %s succesfully registered as transaction %d.', 'MicroBalance'), "€" . number_format($amount, 2), id_to_name($user), $transaction) . "</p>"; } else { echo "<p>" . __('Something went wrong, inventory purchase not added.', 'MicroBalance') . "</p>\n"; } } } } ?> <h1><?php _e("Inventory purchase", "MicroBalance"); ?> </h1> <form method="post"> <div class="inputDiv"> <h2><?php _e('Payed by', 'MicroBalance');
<?php include_once 'includes/header.php'; $profile_id = isset($_GET['id']) ? $_GET['id'] : $_SESSION['user_id']; echo '<center>' . id_to_name($profile_id) . '</center>'; news_feed($profile_id); include_once 'includes/footer.php';
<?php include_once 'includes/header.php'; if (!isset($_GET['user']) or $_GET['user'] == '') { $user_name = id_to_name($_SESSION['user_id']); } else { $user_name = mysql_real_escape_string($_GET['user']); } $user_id = name_to_id($user_name); $photo_result = mysql_query("SELECT * FROM photos WHERE user_id='{$user_id}' ORDER BY photo_views DESC LIMIT 0, 100"); $photo_count = mysql_num_rows($photo_result); if ($photo_count == 0) { echo 'No images have been uploaded by this user.'; } else { while ($photo_row = mysql_fetch_assoc($photo_result)) { $date = date("Y\\-m\\-d H:i:s"); echo '<b><h1>' . $photo_row['photo_title'] . '</h1></b>' . resize_img($photo_row['photo_name'], $photo_row['user_id'], 400, 2000) . '<br />' . views($photo_row['photo_name'], $date) . '<br />'; } } include_once 'includes/footer.php';
<?php include_once 'includes/header.php'; $photo_name = mysql_real_escape_string($_GET['photo_name']); $photo_result = mysql_query("SELECT * FROM photos WHERE photo_name='{$photo_name}'"); $photo_count = mysql_num_rows($photo_result); if ($photo_count == 0) { echo 'That image doesn\'t exist.'; } else { $photo_row = mysql_fetch_assoc($photo_result); $date = date("Y\\-m\\-d H:i:s"); echo '<b><h1>' . $photo_row['photo_title'] . '</h1></b>' . resize_img($photo_row['photo_name'], $photo_row['user_id']) . '<br />' . views($photo_row['photo_name'], $date, TRUE) . '<br />'; if ($photo_row['anon'] == 0) { echo 'Posted by <a href="user.php?user='******'user_id']) . '">' . id_to_name($photo_row['user_id']) . '</a>.'; } elseif ($photo_row['anon'] == 1) { echo 'Posted by ' . id_to_name(2) . '.'; } } include_once 'includes/footer.php';