Tuesday, May 23, 2017

phprunner view custom filed status

if ($value=="Process")
$str.='<img src="1.png">';
if ($value=="Receive")
$str.='<img src="2.png">';
if ($value=="Reject")
$str.='<img src="3.png">';

$value=$str;


phpruuner no row change field to custom

View Custom
if($_SESSION['last_date'] != $data['Datum'])
{
    $_SESSION['Rang'] = 0;
    $_SESSION['last_date'] = $data['Datum'];
}
else
{
    $_SESSION['Rang']++;
}

$value = $_SESSION['Rang'];

In Before Process event

$_SESSION['last_date'] = '';
$_SESSION['Rang'] = 0;

// Place event code here.
// Use

Sunday, May 21, 2017

php row number auto



<p>The .table-bordered class adds borders to a table:</p>
<table class="table table-bordered">
<thead>
<th>No</th>
<th>DocName</th>
<th>CurrentDate</th>
<th>EmpId</th>
<th>Page</th>
<th>DocFile</th>

</thead>

<tr>
<?php
$no = 1; ?>
<?php
$query = mysql_query("SELECT * FROM hr WHERE (DATE(`currentdate`) = CURDATE()) ORDER BY id DESC") or die(mysql_error());
while ($row = mysql_fetch_array($query)) {
?>


<td><?php echo $no; $no++ ?></td>
<td> <?php echo $row['DocName'] . ''; ?> </td>
<td> <?php echo $row['currentdate'] . ''; ?> </td>
<td> <?php echo $row['EmpId'] . ''; ?> </td>
<td> <?php echo $row['page'] . ''; ?> </td>
<td> <?php echo $row['DocFile'] . ''; ?> </td>

</tr>
<?php }; ?>

</table>
</div>

Sunday, May 14, 2017

Center dice html popup

<script>

  function CenterWindow(windowWidth, windowHeight, windowOuterHeight, url, wname, features) {
    var centerLeft = parseInt((window.screen.availWidth - windowWidth) / 2);
    var centerTop = parseInt(((window.screen.availHeight - windowHeight) / 2) - windowOuterHeight);

    var misc_features;
    if (features) {
      misc_features = ', ' + features;
    }
    else {
      misc_features = ', status=no, location=no, scrollbars=yes, resizable=yes';
    }
    var windowFeatures = 'width=' + windowWidth + ',height=' + windowHeight + ',left=' + centerLeft + ',top=' + centerTop + misc_features;
    var win = window.open(url, wname, windowFeatures);
    win.focus();
    return win;
  }
</script>

</head>

<body>
<a href="javascript:void(0)"
   onclick="CenterWindow(1000,800,100,'http://10.1.1.176/live');">Click here</a>
 
 
 

Monday, May 8, 2017

sample popup center

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Center</title>

<script>

  function CenterWindow(windowWidth, windowHeight, windowOuterHeight, url, wname, features) {
    var centerLeft = parseInt((window.screen.availWidth - windowWidth) / 2);
    var centerTop = parseInt(((window.screen.availHeight - windowHeight) / 2) - windowOuterHeight);

    var misc_features;
    if (features) {
      misc_features = ', ' + features;
    }
    else {
      misc_features = ', status=no, location=no, scrollbars=yes, resizable=yes';
    }
    var windowFeatures = 'width=' + windowWidth + ',height=' + windowHeight + ',left=' + centerLeft + ',top=' + centerTop + misc_features;
    var win = window.open(url, wname, windowFeatures);
    win.focus();
    return win;
  }
</script>

</head>

<body>
<a href="javascript:void(0)"
   onclick="CenterWindow(1000,800,50,'http://10.1.1.176/live');">Click here</a>
 
 

</body>






</html>

Sunday, April 30, 2017

Sample Php Runner Popup Center Page

Sample Php Runner Popup Center Page


Sample JS

  <script type="text/javascript"src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="js/jquery.popupwindow.js"></script>
    <script type="text/javascript">
var profiles =
{

window800:
{
height:800,
width:800,
status:1
},

window200:
{
height:200,
width:200,
status:1,
resizable:0
},

windowCenter:
{
height:650,
width:1024,
center:1
},

windowNotNew:
{
height:300,
width:400,
center:1,
createnew:0
},

windowCallUnload:
{
height:300,
width:400,
center:1,
onUnload:unloadcallback
},

};

function unloadcallback(){
alert("unloaded");
};


    $(function()
{
    $(".popupwindow").popupwindow(profiles);
    });
</script>

Make a Js
jquery.popupwindow.js
<script>

jQuery.fn.popupwindow = function(p)
{

var profiles = p || {};

return this.each(function(index){
var settings, parameters, mysettings, b, a, winObj;

// for overrideing the default settings
mysettings = (jQuery(this).attr("rel") || "").split(",");


settings = {
height:600, // sets the height in pixels of the window.
width:600, // sets the width in pixels of the window.
toolbar:0, // determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}.
scrollbars:0, // determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}.
status:0, // whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}.
resizable:1, // whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable.
left:0, // left position when the window appears.
top:0, // top position when the window appears.
center:0, // should we center the window? {1 (YES) or 0 (NO)}. overrides top and left
createnew:1, // should we create a new window for each occurance {1 (YES) or 0 (NO)}.
location:0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}.
menubar:0, // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}.
onUnload:null // function to call when the window is closed
};

// if mysettings length is 1 and not a value pair then assume it is a profile declaration
// and see if the profile settings exists

if(mysettings.length == 1 && mysettings[0].split(":").length == 1)
{
a = mysettings[0];
// see if a profile has been defined
if(typeof profiles[a] != "undefined")
{
settings = jQuery.extend(settings, profiles[a]);
}
}
else
{
// overrides the settings with parameter passed in using the rel tag.
for(var i=0; i < mysettings.length; i++)
{
b = mysettings[i].split(":");
if(typeof settings[b[0]] != "undefined" && b.length == 2)
{
settings[b[0]] = b[1];
}
}
}

// center the window
if (settings.center == 1)
{
settings.top = (screen.height-(settings.height + 110))/2;
settings.left = (screen.width-settings.width)/2;
}

parameters = "location=" + settings.location + ",menubar=" + settings.menubar + ",height=" + settings.height + ",width=" + settings.width + ",toolbar=" + settings.toolbar + ",scrollbars=" + settings.scrollbars  + ",status=" + settings.status + ",resizable=" + settings.resizable + ",left=" + settings.left  + ",screenX=" + settings.left + ",top=" + settings.top  + ",screenY=" + settings.top;

jQuery(this).bind("click", function(){
var name = settings.createnew ? "PopUpWindow" + index : "PopUpWindow";
winObj = window.open(this.href, name, parameters);

if (settings.onUnload) {
// Incremental check for window status
// Attaching directly to window.onunlaod event causes invoke when document within window is reloaded
// (i.e. an inner refresh)
unloadInterval = setInterval(function() {
if (!winObj || winObj.closed) {
clearInterval(unloadInterval);
settings.onUnload.call($(this));
}
},500);
}

winObj.focus();

return false;
});
});

};
</script>

Tuesday, April 4, 2017

Image Scanning and Uploading in PHP Application

<?php   
  $fileTempName = $_FILES['RemoteFile']['tmp_name'];    
  $fileSize = $_FILES['RemoteFile']['size'];
  $fileName = "UploadedImages\\".$_FILES['RemoteFile']['name'];
  
  if (file_exists($fileName)) 
    $fWriteHandle = fopen($fileName, 'w');
  else
    $fWriteHandle = fopen($fileName, 'w');
  $fReadHandle = fopen($fileTempName, 'rb');
  $fileContent = fread($fReadHandle, $fileSize);
  fwrite($fWriteHandle, $fileContent);
  fclose($fWriteHandle);
  echo "DWTBarcodeUploadSuccess:".$_FILES['RemoteFile']['name'];
?>
<script>
function AcquireImage(){
            var DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
            DWObject.IfShowUI = false;
            DWObject.SelectSource();
            DWObject.OpenSource();
            DWObject.AcquireImage();
        }
function btnUpload_onclick(){
DWObject.HTTPUploadThroughPostEx(
            strHTTPServer,
            DWObject.CurrentImageIndexInBuffer,
            strActionPage,
            uploadfilename,
            strImageType );
}
</script>

phprunner view custom filed status

if ($value=="Process") $str.='<img src="1.png">'; if ($value=="Receive") $str.='<i...