Пример #1
0
            $body = str_replace('$wi_name', $woi['name'], $body);
            $body = str_replace('$wi_note', $woi['note'], $body);
            $body = str_replace('$wi_quantity_est', $woi['e_quantity'], $body);
            $body = str_replace('$wi_rate_est', $woi['e_rate'], $body);
            $body = str_replace('$wi_unit_est', $woi['e_unit'], $body);
            $body = str_replace('$wi_quantity', $woi['a_quantity'], $body);
            $body = str_replace('$wi_rate', $woi['a_rate'], $body);
            $body = str_replace('$wi_unit', $woi['a_unit'], $body);
            $body = str_replace('$wi_cost', sprintf('%0.4f', $woi['a_quantity'] * $woi['a_rate']), $body);
            $body = str_replace('$wi_status', $woi['status'], $body);
            $mail['body'] = $body;
            $_SESSION['mail-compose'] = $mail;
            // Want to Add This History
            $_SESSION['return-path'] = '/workorder/view?w=' . $wo['id'];
            Radix::redirect('/email/compose');
        }
        Radix::redirect('/workorder/view?w=' . $wo['id']);
        break;
    case 'view':
        $id = intval($_GET['id']);
        $woi = new WorkOrderItem($id);
        if (empty($woi['id'])) {
            Session::flash('fail', sprintf('Cannot find Work Order Item #%d', $id));
            return;
        }
        $this->WorkOrder = new WorkOrder($woi['workorder_id']);
        $this->WorkOrderItem = $woi;
        break;
    default:
        Radix::dump($_POST);
}
Пример #2
0
        if ('data:image/jpeg;base64,' == substr($image, 0, 23)) {
            $b64 = substr($image, 22);
            // Radix::dump($b64);
            $jpg_data = base64_decode($b64);
            $dir = sprintf('%s/webroot/img/content/contact/%u', APP_ROOT, $this->Contact['id']);
            if (!is_dir($dir)) {
                mkdir($dir, 0755, true);
            }
            $jpg_file = sprintf('%s/0.jpg', $dir);
            $res = file_put_contents($jpg_file, $jpg_data);
            if (0 == $res) {
                Session::flash('fail', 'Unable to write the snapshot');
            }
        }
        if ('data:image/png;base64,' == substr($image, 0, 22)) {
            $b64 = substr($image, 22);
            Radix::dump($b64);
            $png_data = base64_decode($b64);
            $dir = sprintf('%s/webroot/img/content/contact/%u', APP_ROOT, $this->Contact['id']);
            if (!is_dir($dir)) {
                mkdir($dir, 0755, true);
            }
            $png_file = sprintf('%s/0.png', $dir);
            $res = file_put_contents($png_file, $png_data);
            if (0 == $res) {
                Session::flash('fail', 'Unable to write the snapshot');
            }
        }
        Session::flash('info', 'Capture Saved');
        Radix::redirect('/contact/view?c=' . $this->Contact['id']);
}
Пример #3
0
// Search
// echo '<form action="' . Radix::link('/account/search') . '">';
// echo '<div>';
// echo '<input type="text" name="q" value="">';
// echo '<button value="search">Search</button>';
// echo '</div>';
echo '<p><strong>Cash</strong> basis, reports for money collected when B&amp;O</p>';
echo '<p>Accounts for Period: ' . $this->date_alpha . ' - ' . $this->date_omega . '</p>';
echo '<table>';
foreach ($this->AccountList as $item) {
    if ($x_kind != $item['kind']) {
        echo "<tr><th>Code</th><th>{$item['kind']}</th><th>Balance</th><th colspan='3'>Actions</th></tr>";
    }
    echo '<tr class="rero">';
    $indent = str_repeat('&nbsp;', substr_count($item['full_code'], '/'));
    echo '<td>' . $indent . '<a href="' . Radix::link('/account/ledger?id=' . $item['id']) . '">' . html($item['full_code']) . '</td>';
    echo "<td>{$item['name']}";
    if (strlen($item['account_tax_line_name'])) {
        echo " <span class='s'>({$item['account_tax_line_name']})</span>";
    }
    echo '</td>';
    echo '<td class="r">' . number_format(abs($item['balance']), 2) . '</td>';
    // echo '<td class="r"><a href="' . Radix::link('/account/ledger?id=' . $item['id']) . '">' . $img_al . '</td>';
    echo '<td class="r"><a href="' . Radix::link('/account/journal?id=' . $item['id']) . '"><i class="fa fa-align-left"></i></td>';
    echo '<td class="r"><a href="' . Radix::link('/account/edit?id=' . $item['id']) . '"><i class="fa fa-check-square-o"></i></td>';
    echo '</tr>';
    $x_kind = $item['kind'];
}
echo '</table>';
Radix::dump($_GET);
Пример #4
0
<script src="<?php 
echo Radix::link('/vendor/webcamjs/webcam.js');
?>
"></script>
<script>
$(function() {

	$('#exec-camera-preview').on('click', function() {
		Webcam.set({
			height: 240,
			width: 320,
			dest_height: 240,
			dest_width: 320,
		//	image_format: 'png'
		});
		Webcam.attach('#camera-preview');
	});

	$('#exec-camera-capture').on('click', function() {
		Webcam.snap( function(data_uri) {
			document.getElementById('camera-capture').innerHTML = '<img src="'+data_uri+'"/>';
			document.getElementById('image-data').value = data_uri;
			Webcam.reset();
		});
	});
});
</script>

<?php 
Radix::dump($this->Contact);