public function Log() { $Filename = sprintf('%s_%s', (new \DateTime('now', new \DateTimeZone('GMT')))->format('Y-m-d'), $this->GetType()); $Log = \Data::Get($Filename, true, false, array($this->LogDirectory)); if (empty($Log) || !is_array($Log)) { $Log = array(); } $Log[] = $this; return \Data::Set($Filename, $Log, true, true, array($this->LogDirectory)); }
private function LoadPreview() { if (method_exists($this, 'GetPreview')) { $Filename = \FileManager::GetFilename($this->File); if (!empty($this->PreviewFilenameSuffix)) { $Filename .= '.' . $this->PreviewFilenameSuffix; } $Filename .= '.jpg'; $Preview = \Data::Get($Filename, false, false, array($this->MediaDirectory)); if (!empty($Preview)) { if (empty($this->Preview)) { $this->Preview = $Preview; } return true; } elseif (!empty($this->Preview)) { return \Data::Set($Filename, $this->Preview, false, true, array($this->MediaDirectory)); } } return false; }
<tr> <td style="text-align: center"><input title="Remove size from this material" type=button value="-" onclick="NotReady();"></td> <td><?php echo $n + 1; ?> </td> <td><?php echo Data::Get('current_material', 'fraction_in', $n); ?> </td> <td><?php echo Data::Get('current_material', 'decimal_in', $n); ?> </td> <td><?php echo Data::Get('current_material', 'millimeters', $n); ?> </td> </tr> <?php } } else { ?> <tr> <td colspan="999" style="text-align: center">None found</td> </tr> <?php } ?> <table> <!-- ============ END Sizes by Material ============ -->
echo Data::Get('all_materials', 'balls_per_kilo', $n); ?> '></td> <td><input id="id_<?php echo str_pad(Data::Get('all_materials', 'id', $n), 2, '0', STR_PAD_LEFT); ?> _page_link" readonly="readonly" type="text" style="width: 510px; background: none; border: 0; " value='<?php echo Data::Get('all_materials', 'page_link', $n); ?> '></td> <td style="background-color: white;"> <input id="id_<?php echo str_pad(Data::Get('all_materials', 'id', $n), 2, '0', STR_PAD_LEFT); ?> _save" type=button title="Save" value="Save" onclick="SaveMaterial();" style="display: none"> <input id="id_<?php echo str_pad(Data::Get('all_materials', 'id', $n), 2, '0', STR_PAD_LEFT); ?> _cancel" type=button title="Cancel" value="Cancel" onclick="CancelMaterial();" style="display: none"> </td> </tr> <?php } ?> </table> <!-- ============ END Materials ============ --> </div> <?php include 'javascript.js.php';
<br> Materials Available for size: <?php echo Data::GetData('all_sizes', 'fraction_in', 'id', $this->GetQs('size')); ?> <br><br> <?php if (Data::GetRowCount('current_size') > 0) { ?> <?php for ($n = 0; $n < Data::GetRowCount('current_size'); $n++) { ?> <a href="<?php echo Data::Get('current_size', 'page_link', $n); ?> "><?php echo Data::Get('current_size', 'material', $n); ?> </a><br> <?php } ?> <?php } else { ?> None found for size <?php } ?> </div>
echo Data::Get('all_sizes', 'one_ball_weight_ounce', $n); ?> '></td> <td><input id="id_<?php echo str_pad(Data::Get('all_sizes', 'id', $n), 2, '0', STR_PAD_LEFT); ?> _one_ball_weight_gram" readonly="readonly" type="text" style="width: 120px; background: none; border: 0; " value='<?php echo Data::Get('all_sizes', 'one_ball_weight_gram', $n); ?> '></td> <td style="background-color: white;"> <input id="id_<?php echo str_pad(Data::Get('all_sizes', 'id', $n), 2, '0', STR_PAD_LEFT); ?> _save" type=button title="Save" value="Save" onclick="SaveSize();" style="display: none"> <input id="id_<?php echo str_pad(Data::Get('all_sizes', 'id', $n), 2, '0', STR_PAD_LEFT); ?> _cancel" type=button title="Cancel" value="Cancel" onclick="CancelSize();" style="display: none"> </td> </tr> <?php } ?> </table> <!-- ============ END Sizes ============ --> </div> <?php include 'javascript.js.php';