Ejemplo n.º 1
0
 function kontoinfo($id = 0, $sort = 'stigende')
 {
     $this->jquery->script('/ressources/jquery-1.6.2.min.js', TRUE);
     $this->javascript->compile();
     $this->load->model('Account');
     if ($id == 0) {
         $id = $this->session->userdata('uid');
     }
     $balance = $this->Account->get_balance($id);
     setlocale(LC_MONETARY, 'da_DK');
     $balance = number_format($balance, 2, ',', '.');
     $posts = $this->Account->get_transactions($id);
     $post_to_view = array();
     $sum = 0;
     for ($i = 0; $i < count($posts); $i++) {
         $sum += $posts[$i]['amount'];
         $post_to_view[$i]['orderno'] = $posts[$i]['orderno'];
         $post_to_view[$i]['type'] = $posts[$i]['type'];
         $post_to_view[$i]['item_text'] = $posts[$i]['item'];
         $post_to_view[$i]['time'] = danish_date_format($posts[$i]['created']);
         $post_to_view[$i]['weeknumber'] = $posts[$i]['weeknumber'];
         $post_to_view[$i]['external_id'] = $posts[$i]['external_id'];
         $post_to_view[$i]['payment_method'] = $posts[$i]['method'];
         $post_to_view[$i]['credit_comment'] = $posts[$i]['comment'];
         $post_to_view[$i]['amount'] = $posts[$i]['amount'];
         $post_to_view[$i]['authorized_by'] = $posts[$i]['authorized_by'];
         $post_to_view[$i]['sub_sum'] = $sum;
     }
     $viewdata['transactions'] = $post_to_view;
     $viewdata['balance'] = $this->Account->get_balance($id);
     $viewdata['sort_desc'] = TRUE;
     $viewdata['id'] = $id;
     if ($sort == 'stigende') {
         $viewdata['sort_desc'] = FALSE;
     }
     $viewdata['heading'] = 'Transaktioner';
     $viewdata['title'] = 'Transaktioner';
     $viewdata['admin'] = FALSE;
     $this->load->view('v_transactions', $viewdata);
 }
Ejemplo n.º 2
0
		<tr class="odd">
			<td style="width:22px;"><strong>#</strong></td>
			<td style="width:200px;"><strong>Navn</strong></td>
			<td style="width:200px;"><strong>Email</strong></td>
			<td style="width:150px;"><strong>Sidste login</strong></td>
			<td style="width:75px;"><strong>Oprettet</strong></td> 
		</tr>
<?php 
$classes = array('even', 'odd');
$count = 0;
foreach ($content as $member) {
    echo '		<tr class="' . $classes[$count % 2] . '"' . ">\n\t\t";
    echo '	<td>' . $member['uid'] . '</td>' . "\n";
    echo '			<td>' . $member['firstname'] . ' ' . $member['middlename'] . ' ' . $member['lastname'] . '</td>' . "\n";
    echo '			<td><a href="mailto:' . $member['email'] . '">' . $member['email'] . '</a></td>' . "\n";
    echo '			<td>' . danish_date_format($member['last_login'], TRUE) . '</td>' . "\n";
    echo '			<td>' . danish_date_format($member['created']) . '</td>' . "\n";
    echo "\t\t</tr>\n";
    $count++;
}
?>
	</table>
</span>

<?php 
echo isset($script_head) ? $script_head : '';
echo isset($script_foot) ? $script_foot : '';
?>
</body>
</html>
Ejemplo n.º 3
0
    echo '				<td style="width:200px;">Navn</td>' . "\n";
    echo '				<td style="width:200px;">E-mail</td>' . "\n";
    echo '				<td style="width:50px;">Aktiv?</td>' . "\n";
    echo '				<td style="width:100px;">Oprettet</td>' . "\n";
    echo '				<td style="width:100px;"">Sidste login</td>' . "\n";
    echo '				<td style="width:100px;">Beløb</td>' . "\n";
    echo '				<td style="width:200px;">Begrundelse</td>' . "\n";
    echo '			</tr>' . "\n";
    foreach ($posts as $post) {
        echo '			<tr class="' . $classes[$count % 2] . '"' . ">\n";
        echo '				<td>' . $post['id'] . '</td>' . "\n";
        echo '				<td>' . $post['name'] . '</td>' . "\n";
        echo '				<td>' . $post['email'] . '</td>' . "\n";
        echo '				<td>' . $translate[$post['active']] . '</td>' . "\n";
        echo '				<td>' . danish_date_format($post['created']) . '</td>' . "\n";
        echo '				<td>' . danish_date_format($post['last_login']) . '</td>' . "\n";
        echo '				<td><input type="text" name="id-' . $post['id'] . '" size="3" /> kr.</td>' . "\n";
        echo '				<td><textarea cols="30" rows="2" name="explanation-' . $post['id'] . '"></textarea></td>' . "\n";
        echo '			</tr>' . "\n";
        $count++;
    }
    echo '			</table>' . "\n";
    echo '			<br />' . "\n";
    echo '			<li>' . "\n";
    echo '				<input type="submit" value="Kreditér" class="form_button"/>	' . "\n";
    echo '			</li>' . "\n";
}
?>
		</fieldset>
	</form>
	</body>